Jump to content

getting file size


php_developer

Recommended Posts

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

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

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

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...