Thread: Shadow upload

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

    Join Date
    Jul 2005
    Rep Power

    Shadow upload


    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

    Set objUpload=New ShadowUpload
    	If objUpload.GetError<>"" Then
    		Response.Write("sorry, could not upload: "&objUpload.GetError)
    		Response.Write("found "&objUpload.FileCount&" files...<br />")
    		For x=0 To objUpload.FileCount-1
    			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 />")
    	End If

    but it came as blank

    can u tell me what i am doing wrong

  2. #2
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2012
    Rep Power

    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: 129
    Last Post: June 8th, 2014, 03:27 AM
  2. Mr Hanky vs. Shadow Striker
    By Shadow Wizard in forum ASP Free Gaming Center
    Replies: 4
    Last Post: January 9th, 2007, 09:39 AM
  3. Multiple file upload
    By sinner8347 in forum ASP Development
    Replies: 5
    Last Post: December 8th, 2006, 11:34 AM
  4. Shadow Uploader - uploading any file (not only images)
    By Tmdev in forum ASP Development
    Replies: 3
    Last Post: September 13th, 2006, 06:55 AM
  5. Upload file to own PC
    By sinner8347 in forum ASP Development
    Replies: 4
    Last Post: April 20th, 2006, 03:19 AM

IMN logo majestic logo threadwatch logo seochat tools logo