File Uploads using SA Fileup
For download and infomation consult the soft artisans web site.
Click here
or this article
The file that you uploaded was empty. Most likely, you did not specify a valid filename to your browser or you left the filename field blank. Please try again.<%
ElseIf oUp.ContentDisposition <> "form-data" Then
%>Your upload did not succeed, most likely because your browser does not support Upload via this mechanism.<%
Else
%>The file was successfully transmitted by the user.
<%
' save file
' ==========
strFilename = getOriginalFileName(oUp.form("fileUp").UserFileName)
If strFilename <> "" Then
Response.Write "
file saved to == " & strPath & "\" & strFilename
oUp.form("fileUp").SaveAs (strPath & "\" & strFilename)
If Err <> 0 Then
%>
An error occurred when saving the file on the server.<%
Else
%>
File saved successfully.<%
End If
Else
Response.Write "
no filename "
End if
End if
' get other form variables
hiddenVar = oUp.Form("hiddenVar")
function getOriginalFilename(strUploadedFile)
Response.Write "
full path = " & strUploadedFile
dim tempvar
if strUploadedFile="" then
getOriginalFilename = ""
exit function
end if
tempvar = InStrRev(strUploadedFile,chr(92),len(strUploadedFile))
tempvar = len(strUploadedFile) - tempvar
Response.Write "
just file name = " & right(strUploadedFile, tempvar)
getOriginalFilename = right(strUploadedFile, tempvar)
end function