...

View Full Version : Finding Upload file size - Javascript



Ushhh
09-08-2006, 08:59 AM
Hi All,

Hope I can some clear idea for this post here.

I have used ASP.net 1.1. In that application user can upload the file(any printable document like doc/xls/ppt/pps/jpg/gif etc.,). The user allows to upload a max of 4MB.

But if the user uploads more than 4MB I'll issue a msg. But in slow network, the user needs to wait for much time to upload and even get error msg.

I want to stop from client side itself. Once the user selects the file to upload it shud b checked frm Javascript.

* Is there any way to do achieve this?
* The user should not change security settings in browser, if u suggests some method.
* If it is not possible/meaningful then please tell me the reasons very clearly. So I can stop searching.
* Please note any printable document can be uploaded.


Moderators & Experts please give kind attention.

Thanks
Usha

rlemon
09-08-2006, 02:38 PM
i've looked into this one once before and the only way is with an activeX component which requires signing.

you could always take the way of XmlHttpRequests and just 'uploading... uploading... upload failed: file too big!' (similar to gmail)

rlemon
09-08-2006, 02:43 PM
*requires security changes in FF
http://www.captain.at/ajax-file-upload.php

http://php5.bluga.net/progressDemo/demo.php *Good one with the 'codebehind' done in php, you can easily convert.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum