ASP, Contact Form, Attachment Question

Discussion in 'Web Design & Coding' started by madmatt, Feb 22, 2006.

  1. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    I have a form and backend processing using ASP. I want the user to be able to attach a ZIP file (if necessary) to the email.

    I know it has to be uploaded to the web server first and then emailed but I have no clue on how to accomplish this.

    Any help is appreciated. Thank you.
     
  2. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
    I would recommend ASP Upload...

    www.aspupload.com

    I have used it a bit, you should check it out. I can probably give you some help if you want, but the tutorials they have on the site should be all you need.

    There may be a free way to do it, but when I searched I didn't see much. The thing I liked about this is that it allows you to send the e-mail directly, uploading the attachment to memory so that server security is not compromised by allowing people to upload to the server.
     
  3. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    I need custom code. I won't use third party.

    Also, looks too complex for what I need. Here's all I have so far...

    File check to verify file is a ZIP

    Code:
       if (document.rfq.attachment.value) {
         var fileName	= document.rfq.attachment.value;
         var fileLength	= parseInt(fileName.length) - 3;
         var fileExt		= fileName.substring(fileLength,fileLength + 3);
       
         if (fileExt != "zip") {
           errorMsg += "\nAttachment: \tOnly ZIP files can be attached -- please ZIP the files before attaching them";
         } 
       }
    
     
    Last edited: Feb 22, 2006
  4. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
    Did you get this figured out?
     
  5. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    No, I got busy working on other things. Never went back to it.
     
  6. Nismo83

    Nismo83 OSNN AZN Addict

    Messages:
    383
    matt... ASPUpload rocks actually.

    It is easy and no hassle in getting the upload to work. I did one for an OFFLINE project to upload photo and up till now it is still running strong