sending images through without uploading to server

Results 1 to 2 of 2

Thread: sending images through without uploading to server

  1. #1
    Redmanz Guest

    Default sending images through without uploading to server

    I would like my clients to be able to send images to me using aspUpload. I want them to be able to browse<BR>there local drive for the images.........fill in the rest of the form than<BR>press the button and presto it mails to me...not to my server!.......I know<BR>regular email will do this with attachements but I would like control over<BR>image size, type, etc........which aspupload is the form<BR>sample I am working with. Note I have not included the actual form fields to<BR>cut down on size. There are 3 images I would like to get with this form. So<BR>far it will email me one image only with no distinction between gif, jpeg or<BR>psd. Even though it is coded? to only accept gif and jpg<BR><BR>&#060;%<BR> &#039 Capture an uploaded file<BR> Set Upload = Server.CreateObject("Persits.Upload")<BR>&#039A CHANGE<BR>Upload.OverwriteFiles = False<BR><BR>&#039SECOND CHANGE IMAGE CONTROL<BR>For Each File in Upload.Files<BR>If File.ImageType &#060;&#062; "GIF" and File.ImageType &#060;&#062; "JPG" Then<BR> Response.Write "GIF or JPG files only please!"<BR> Exit For<BR>End If<BR>If File.ImageWidth &#062; 150 Then<BR> Response.Write "Image width cannot exceed 250 pixels."<BR> Exit For<BR>End If<BR><BR>If File.ImageHeight &#062; 200 Then<BR> Response.Write "Image height cannot exceed 200 pixels."<BR> Exit For<BR>End If<BR><BR>Next<BR> Upload.IgnoreNoPost = True &#039 suppress "Nothing has been posted" error<BR> Count = Upload.Save("c:sitespremium
    ativeartdatabaseuploads")<BR><BR>&#039 Send mail<BR> If Upload.Form("Send") &#060;&#062; "" Then<BR> Set Mail = Server.CreateObject("Persits.MailSender")<BR> Mail.Host = "" &#039 replace that with your own host<BR> Mail.From = Upload.Form("From")<BR> Mail.AddAddress Upload.Form("To")<BR> Mail.Subject = Upload.Form("Subject")<BR> Mail.Body = Upload.Form("Body")<BR><BR> If Count &#062; 0 Then Mail.AddAttachment Upload.Files(1).Path<BR><BR> On Error Resume Next<BR> Mail.Send<BR> If Err &#060;&#062; 0 Then<BR> Response.Write "Error occurred when trying to send your Images: &#060;B&#062;" &<BR>Err.Description & "&#060;/B&#062;"<BR> Else<BR> Response.Write "Success! Your images have been sent, they should be<BR>available for public viewing online within the next couple of days! Thank<BR>You."<BR> End If<BR> End If<BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default phil collignon article

    there is an article on the subject with free sample code, available at author name:phil collignon. get it before they take it off. i have used that successfuly for uploading images, works with all types of imges

Posting Permissions

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