I have been using Lewis Moten's script for file uploading, ensuring unique filenames, limited filesize and file extensions
I have deployed it successfully on a number of sites, but I have now encountered an issue that i cannot resolve,
I have the script working fine on my local server (IIS) but on the remote hosting server it presents as though it is working fine, gives no errors, but files do not upload!
Does anyone have any ideas? The folder it is uploading has READ/WRITE permissions for the ASP USER, and i would presume there would be error messages if this wasn't the case anyway.
The script that i'm using to call the upload is:
Set Upload = New clsUpload
name = Upload("name").Value
email = Upload("email").Value
comments = Upload("comments").Value
agree = Upload("agree").Value
' If file size is greater then 1 MB
If Upload("File1").Length > 2548576 Then
' Notify user of the error.
Response.Write "File size must be 2 megabytes or less"
' Stop all execution past this line.
' Grab the file name
FileName = Upload.Fields("File1").Fil
' Grab file extension
Ext = Upload.Fields("File1").Fil
' Check to see if file extension is valid
Select Case Ext
Case "GIF", "BMP", "PNG", "JPG", "TIFF", "TIF", "DOC", "RTF", "PDF", "EPS", "JPEG"
FileOK = True
FileOK = False
' If file was not valid
If Not FileOK Then
' Notify user of error
Response.Write "Invalid file extension."
' Stop all execution after this line.
' Get path to save file to
Folder = Server.MapPath("subs") & "\"
' Set the file name to be unique.
FileName = Upload.UniqueName(Folder, FileName)
' Save the binary data to the file system
Upload("File1").SaveAs Folder & FileName
' Release upload object from memory
Set Upload = Nothing