Repost - Uploading files as attachments

Results 1 to 3 of 3

Thread: Repost - Uploading files as attachments

  1. #1
    Join Date
    Dec 1969

    Default Repost - Uploading files as attachments

    Looks like yesterdays visitors were stumped....anyone today kow how to do this??....<BR>I have developed a pretty straightforward website where managers can go to send business "alerts" from a web form. Basically, the alert is emailed out and also submits to a database, and I have created a search utility to find previous alerts sent. I need to program it so that managers can attach files from their harddrive to be sent along with the alert. This file would also need to dump into the database. Can anyone help me with this concept. I know it can be done but I need an example. Thanks in advance.<BR>Kristin

  2. #2
    Suresh Guest

    Default RE: Repost - Uploading files as attachments

    &#060;%<BR>Set Upload = Server.CreateObject("persits.upload.1")<BR><BR>&#0 39 Upload files<BR>Upload.OverwriteFiles = False &#039 Generate unique names<BR>Upload.SetMaxSize 1048576 &#039 Truncate files above 1MB<BR>Upload.Save "c:upload" <BR><BR>&#039 Process all files received<BR>For Each File in Upload.Files<BR> Response.write File.Path<BR> &#039 Save in the database as blob<BR> sql = "insert into tester1(filename) values(?)"<BR> File.ToDatabase "dsn=sdodda;User ID=scott;Pwd=tiger;",sql<BR><BR> &#039 Move to a different location<BR>Response.write File.ExtractFileName<BR> File.Copy "c:upload1\" & File.ExtractFileName<BR> File.Delete<BR>Next<BR>Response.write " Successful Till Here"<BR>&#039 Display description field<BR>Response.Write Upload.Form("Description") & "<BR>"<BR><BR>&#039 Display all selected categories<BR>For Each Item in Upload.Form<BR> If Item.Name = "Category" Then<BR> Response.Write Item.Value & "<BR>"<BR> End If<BR>Next<BR>%&#062; <BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Suresh

    Thank you very very very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts