CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Check file size before upload :: ASP

Print topic Send  topic

Author Message
bhaneef

Posts: 4
Posted: 05/05/2010, 8:45 PM

Hi,
I am doing some upload project. I want to restrict the user to upload files of type jpg/pdf and want to limit the file size to 500KB.

I am able to do this using Pure asp upload component available in codecharge. Now my issue is the system checks for the file size only after the file is uploaded to the temp folder in server.

This just waste the user time he has to wait for a long time to get the error message. Other way it is taking un necessary bandwidth from the server.

Is there any easy way wherin I can check the file size before it initiate the upload process...


Thanks in advance.

_________________
People May not Believe what you say .. They will always believe what you do ...
View profile  Send private message
jjrjr1


Posts: 942
Posted: 05/11/2010, 7:46 AM

Hi

To validate filesize before uploading a file would mean the validation would need to be done client side using javascript or VB script.

However, access to the filesystem is not allowed thru javascript or VBscript due to security limitations.

It can possibly be done using activeX but the client would have to approve the running of the ActiveX control.

Here are a couple of links that might help you.
http://www.jguru.com/faq/view.jsp?EID=330134
http://bytes.com/topic/javascript/answers/460516-check-file-size-javascript

Remember Google is your friend 8-)

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
bhaneef

Posts: 4
Posted: 05/12/2010, 2:38 AM

I want to know is there any option without using Activex as it requires user permission...

In Gmail.. when I click attach , it check file size in seconds and displays message Exceeds permissable limit....

Will see... if you find anything let me know. I will also dig arround and update if i find anything.
Thanks for your time.
_________________
People May not Believe what you say .. They will always believe what you do ...
View profile  Send private message
jjrjr1


Posts: 942
Posted: 05/12/2010, 5:34 AM

Hi

I found this maybe this will do what you want.

http://digitarald.de/project/fancyupload/


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message

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.