php_developer Posted September 28, 2012 Share Posted September 28, 2012 Hello... I want to know that, is it possible to get the size of a file (while uploading it), before it actually uploaded on server ( in case of a form submission )... Means to get the file size at client side while uploading it, and giving an alert in case if size is larger than the specified size , (as client side validation)... Link to comment Share on other sites More sharing options...
niche Posted September 28, 2012 Share Posted September 28, 2012 (edited) This looks like exactly what you need http://w3shaman.com/comment/202 TAG: Progress bar Edited September 28, 2012 by niche 1 Link to comment Share on other sites More sharing options...
php_developer Posted September 28, 2012 Author Share Posted September 28, 2012 This looks like exactly what you need http://w3shaman.com/comment/202 TAG: Progress bar This is nice... But I want to check the file size ("file uploade"), before the form get submitted. Means as we check the file size ( let using php) at server side after it get uploaded... But I want to know that is there any way to get the file size, befor actually submitting the form (i.e. client side validation not at server side ) Link to comment Share on other sites More sharing options...
niche Posted September 28, 2012 Share Posted September 28, 2012 (edited) Sorry. This will get you started:http://stackoverflow...e-before-upload Edited September 28, 2012 by niche Link to comment Share on other sites More sharing options...
birbal Posted September 28, 2012 Share Posted September 28, 2012 clientside js cant access local file. though some modern browser supports "file api which can get file size.https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications 2 Link to comment Share on other sites More sharing options...
php_developer Posted September 29, 2012 Author Share Posted September 29, 2012 Thanx ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now