Scripts: asp :: ASP File System :: Library Article #8
Developer's Section
Upload a File using AspUpload - Persists.Upload By: Erobo Team Member
Hire a Developer for Related Work / Installation | $55 hr
Rating: | Rate It:
Average Votes: (3827)
Favorites:
Learn to upload a file using the AspUpload Object
To upload a file using Persists.Upload.1 Object your server must have
installed the ASPUploadObject on the server.
Upload an Image file using SaveAs Method:
If you need to have control over which name to give the file once
you upload it to the server you can create the following routine to accomplish
just that:
Code Snippet 1
<%
'upload images to server
Server.ScriptTimeout = 3600
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = True
Dim dirpath
dirpath = server.mappath("/images/")
Count = Upload.Save(dirpath)
'retrieve image id from a form
imgID = Upload.Form("imgID")