This is a migrated thread and some comments may be shown as answers.

Client Side Check if file length is zero

3 Answers 76 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
DK
Top achievements
Rank 2
DK asked on 01 Sep 2009, 07:27 AM
How can i find the lenght of the file client side.
I am using only radupload not rad progress area and progress manager.

let me know how can i restrict user to not upload file having size 0  by client side script.
i do not want to hit server for this task.
i want to check it client side.
plz suggest me some logic for this

3 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 01 Sep 2009, 04:37 PM
This documentation article should answer your question:
http://www.telerik.com/help/aspnet-ajax/upload_howtoclientfilesize.html
0
DK
Top achievements
Rank 2
answered on 02 Sep 2009, 04:03 AM
I am not using progress manager and progress area.
and the example you given is using progress area.
please suggest me different one in which there is no use of progress area and progress manager
0
Schlurk
Top achievements
Rank 2
answered on 02 Sep 2009, 01:44 PM
Well it seems like this might be a little bit tricky, a quote from the link I gave you:
"While it is not possible to check the file size before upload begins, you can use the client-side OnClientProgressUpdating event to access information about the file size when it first becomes available."
Also check out this documentation article on the known limitations of radupload.
Since this is a security thing with the javascript engine of browsers, perhaps you should consider implementing a progress area/manager. I do believe you could set them to visible = false and still maintain the functionality behind them (the communication that you need between the client and server).
Tags
Upload (Obsolete)
Asked by
DK
Top achievements
Rank 2
Answers by
Schlurk
Top achievements
Rank 2
DK
Top achievements
Rank 2
Share this question
or