Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aspSmartUpload: How Do I Check If File is Valid Before Upload??

Status
Not open for further replies.

webIntern

Programmer
Nov 22, 2002
40
US
Hi all,

I have a form that allows users to upload files to the server. How do I check, either on the client side before upload OR server side after upload, if the file is valid?

For example, say a user selects file to upload but manually changes the file name in the input box to one that doesn't exist on their drive. What happens is that a new file (of size 0 kb) with that name is created on the server. How do I prevent this? The only way I could think of was to check the individual file size (which is 0 if it's an invalid file), but it doesn't look like aspSmartUpload allows this if I'm uploading multiple files from one form. PLEASE HELP!!!
 
I can't seem to find it on the site. Can you tell me where the script is?

Thanks sooo much.
 
Look at the menu.

View Source
or
Download

I downloaded the script and it works fine, the only thing you may have to do with the folder is allow write permissions which you would most likely have to do with any script that uploads a file.

- Jason

www.sitesd.com
ASP WEB DEVELOPMENT
 
I have a script to upload. I only need to either

a) check file size BEFORE actually saving the files to the server

or

b) check if the file actually exists on the client side prior to upload.

I don't need a new upload script. I am now able to uploading, I'd just like to check the validity of the file I'm uploading. Hope that makes sense. I'm using aspSmartUpload.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top