Thread: Shadow upload

    #1
  1. No Profile Picture
    Contributing User
    ASP Good Citizen (1000 - 1499 posts)

    Join Date
    Jul 2005
    Posts
    1,211
    Rep Power
    16

    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
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 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

Similar Threads

  1. Pure ASP Upload script with additional features
    By Shadow Wizard in forum Code Bank
    Replies: 124
    Last Post: April 7th, 2014, 11:14 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

IMN logo majestic logo threadwatch logo seochat tools logo