Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have used AjaxUpload of Jquery to upload the file. Now I want to check file size before uploading it.
Does anybody knows how to get File size using AjaxUpload in Jquery?

Your help is much appreciated...


Regards,
Nagraj Naik
Posted

With HTML5, you can use the File object provided to get such information. Other than that, you need to use ActiveX in IE.

These couple of threads sums up all about it:
Check file input size with jQuery[^]
jQuery Ajax File Upload[^]
 
Share this answer
 
Don't we have any property to check file size in AjaxUpload method

my code is like this

new AjaxUpload(control, {
action: '/wizard/SavePaymentsDocument' name: 'Attachment',
onSubmit: function (file, ext) {
///something
}

onComplete: function (file, response) {
///something
}


As we have file,ext,response parameter ,can we have any parameter for size.

Regards,
Nagraj Naik
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900