I want to check the file size before uploading it, so that i can restrict the users before uploading. I want it use the jquery, but please suggest some thing else, if it is not possible in that way. I am using PHP at backend.
Asked
Active
Viewed 165 times
0
-
http://stackoverflow.com/questions/307679/using-jquery-restricting-file-size-before-uploading – Ben James Dec 07 '09 at 19:12
4 Answers
3
You can't check file size with Javascript. This is a security restriction. The only way you can do it is only using server-side scripting.

Deniss Kozlovs
- 4,761
- 2
- 28
- 35
0
You cannot. It's a security restriction in Javascript/HTML. Best what you can do is to use a real programming language for which you can write client-side applications which you on its turn can embed in a web page, such as a (signed!) Java Applet or Java Web Start (aka JNLP).

BalusC
- 1,082,665
- 372
- 3,610
- 3,555
0
This is not possible via JavaScript. You could try to use any kind of browser plugin to perform these test. FlashPlayer offers these kind of possibilities.

TheHippo
- 61,720
- 15
- 75
- 100