Thread: Shadow upload

Results 1 to 2 of 2
Share This Thread →
  1. #1
    princecharles is offline Contributing User ASP Free Beginner (1000 - 1499 posts)
    Join Date
    Jul 2005
    Posts
    1,211
    Rep Power
    15

    Shadow upload

    Shadow,

    I used the code to upload the file it worked fine but i need to save the name of the file in a variable so i added the code like this

    Code:
    Set objUpload=New ShadowUpload
    	If objUpload.GetError<>"" Then
    		Response.Write("sorry, could not upload: "&objUpload.GetError)
    	Else  
    		Response.Write("found "&objUpload.FileCount&" files...<br />")
    		For x=0 To objUpload.FileCount-1
    			getfilename=objUpload.File(x).FileName
    			Response.write "getfilename:-" & getfilename & "<br/>"
    
    			Response.Write("file name: "&objUpload.File(x).FileName&"<br />")
    			Response.Write("file type: "&objUpload.File(x).ContentType&"<br />")
    			Response.Write("file size: "&objUpload.File(x).Size&"<br />")
    
    			Call objUpload.File(x).SaveToDisk(Server.MapPath("Uploadfiles"), "")
    			Response.Write("file saved successfully!")
    			Response.Write("<hr />")
    		Next
    	
    	End If

    but it came as blank

    can u tell me what i am doing wrong

    charlee

  2. #2
    subasuga is offline Registered User ASP Free Newbie (0 - 499 posts)
    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0
    Hi,

    I tried this code and works great. however I have one problem. The files get overwritten when the same files are uploaded. Instead i want to throw an error stating "File already exists in the folder". How to do it?

    I tried fso.IfFileExists in the showuploader.asp but it does'nt work.

    Pl help.

    Thanks in advance

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Pure ASP Upload script with additional features
    By Shadow Wizard in forum Code Bank
    Replies: 116
    Last Post: December 10th, 2012, 11:40 AM
  2. Mr Hanky vs. Shadow Striker
    By Shadow Wizard in forum ASP Free Gaming Center
    Replies: 4
    Last Post: January 9th, 2007, 08:39 AM
  3. Multiple file upload
    By sinner8347 in forum ASP Development
    Replies: 5
    Last Post: December 8th, 2006, 10:34 AM
  4. Shadow Uploader - uploading any file (not only images)
    By Tmdev in forum ASP Development
    Replies: 3
    Last Post: September 13th, 2006, 05:55 AM
  5. Upload file to own PC
    By sinner8347 in forum ASP Development
    Replies: 4
    Last Post: April 20th, 2006, 02:19 AM

ASP Free Advertisers and Affiliates