|
ASP Xtreme Evolution
|
UploadThis class implements an easy interface to upload files to a webserver. It’s built using standard only functionallity in ASP. It will automaticly start parsing the binary stream sent by the browser which might take a while if the uploaded files are large. NotesLarge parts of this code is based on code by Gez Lemon of Juicy Studio http://www.juicystudio.com/. It has been and partially rewritten and enhanced by CrazyBeaver Software along with it’s new class interface. About
Summary
Upload_FileEach entry of Upload.Files contains an object of this class. This is the class that user should use to retrieve information from the uploaded file. About
Summary
size
Compute the file size. Returns
Exampledim oUpload, oFile set oUpload = new Upload for each oFile in oUpload.Files set oFile = oUpload.Files(oFile) Response.write(oFile.name & " has " & oFile.size & " bytes<br />" & vbCrLf) set oFile = nothing next set oUpload = nothing saveToFile
Saves the binary in the hard drive. Parameters
Returns
Exampledim oUpload, oFile set oUpload = new Upload for each oFile in oUpload.Files set oFile = oUpload.Files(oFile) if(oFile.saveToFile(Server.mappath("saved/" & oFile.name))) then Response.write(oFile.name & " has been saved...<br />" & vbCrLf) end if set oFile = nothing next set oUpload = nothing |
Compute the file size.
public function size()
Saves the binary in the hard drive.
public function saveToFile( sPath )