CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Check File Size Before Uploading

Print topic Send  topic

Author Message
Andres Rormoser
Posted: 07/06/2007, 5:35 AM

I'm trying to Check File Size Upload before uploading the file to the server.

I know it can be done because for example yousendit.com check file size "before" uploading
the file and several components like ABCUpload show progress bar while uploading.

What i've done is the following:

1. I have a Form with an Upload Compenent inside it named Upload1.
2. In the OnChange event of Upload1 I submit the form
3. After 1 second, while the file is uploading, I stop the submission .
3. Then I check the BytesTotal property of the ABCUpload Upload Component (Upload1)
4. if BytesTotal>MaximumFileSize i show an alert window to the user
5. if BytesTotal<MaximumFileSize the users continues filling the form and submits the form
and the real upload takes place.

Everything it's OK except that smaller files are really uploading in 1 second so the form
is submit where the user did not complete all the form yet.

Anyone has done this before? Any Help?

Thanks, Andres Rormoser


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.