upload file

Results 1 to 2 of 2

Thread: upload file

  1. #1
    Join Date
    Dec 1969

    Default upload file

    HEllo,<BR> Can some one tell me how to solve this<BR> I have uploaded a file using VBSCRIPT. Now I want to write a code to delete it or save a new file with the same name. Can some one tell me how to do this. <BR><BR>karan

  2. #2
    fool Guest

    Default RE: upload file

    there are a lot of usefull utilities to do this, I did it recently but I am no expert, so I will give you some links and some code and let you try and figure it out on your own (faster than me learning it again then explaining it to you)<BR><BR>my code that parses an uploaded file that was passed from a form to an ASP script using method="post" AND (IMPORTANT) enctype"multipart/form-data"<BR><BR>oh yeah and this uses SA-file up<BR><BR>&#039THIS SECTION UPLOADS THE APPROPRIATE FILE<BR>Dim strPath<BR>Dim strPath2<BR>Dim strFileName<BR>Dim upl<BR>Dim fileName<BR><BR>&#039get path of file<BR>Set upl = Server.CreateObject("SoftArtisans.FileUp")<BR>obje ct creation error"<BR>Response.Redirect "error.asp"<BR><BR><BR><BR>strPath = Request.ServerVariables("PATH_TRANSLATED")<BR>strP ath2 = Mid(strPath, 1, InStrRev(strPath, "\")) & "PublicBkm"<BR>upl.Path = strPath2<BR>strFileName = Mid(upl.UserFilename, InStrRev(upl.UserFilename, "\") +1)<BR>fileName=strFileName<BR>&#039this is the actual physical path the to attachment in UPLOADS<BR>strFileName = strPath2 & "\" & strFileName<BR><BR>&#039make sure that SA-FileUP could get to the file<BR>If upl.IsEmpty Then<BR> Response.Redirect "uploaderror.asp"<BR>End If<BR><BR>&#039store the attachment until it can be deleted<BR>upl.SaveAs strFileName<BR> <BR>if this was no help then maybe one of these links can be of some help.<BR><BR>http://www.asptoday.com/articles/20000316.htm<BR>http://www.15seconds.com/ (they had a good article at one point)<BR>http://www.learnasp.com/sa/SA-FileUp_Lesson1.asp

Posting Permissions

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