views:

171

answers:

1

I want to implement the Jquery validation on the client. When a user is going to upload a file, the Jquery will check the size of the file and if it exceeds the max size, a user can not upload the file. How to do it using Jquery or Jquery validation plugin?

+1  A: 

You can't do it with JQuery. The problem is that javascript can not access the file system.

Here is something you can read about the subject - http://stackoverflow.com/questions/307679/using-jquery-restricting-file-size-before-uploading

Svetlozar Angelov