Topic: how to get file size in javascript
Hi,
I want to validate file size before uploading file . returns false once file selected morethan 2mb.
can we get filesize in javascript.please help me. it's urgent
thanks ,
lucky
You are not logged in. Please login or register.
Rails Forum - Ruby on Rails Help and Discussion Forum » XHTML/CSS/JavaScript » how to get file size in javascript
Hi,
I want to validate file size before uploading file . returns false once file selected morethan 2mb.
can we get filesize in javascript.please help me. it's urgent
thanks ,
lucky
Hi,
I don't believe you can do this with javascript. It would be a security risk to allow javascript on a third-party website to read the file-system of the computer that is accessing the site.
There are some flash solutions I have seen (that integrate with Rails) that can do this though.
Regards
Robin
Hosting provided by aTech Media