Jun 29, 2012, 5:46 PM
[CLOSED] How to identify upload file size before uploading in IE?
Hi,
I have to restrict the maximum upload file size is something like 25MB. The following javascript code working fine with fileuploadfield in Chrome and Firefox but not in IE. Is there any way to check this in IE?
I have to restrict the maximum upload file size is something like 25MB. The following javascript code working fine with fileuploadfield in Chrome and Firefox but not in IE. Is there any way to check this in IE?
var ret = true;
if (Ext.isIE) {
return;
}
var size = 0;
var names = '';
for (var num1 = 0; num1 < el.files.length; num1++) {
var file = el.files[num1];
names += file.name + '\r\n';
size += file.size;
}
var fileSize = Ext.util.Format.fileSize(size);
if (size > 26214400) {
Ext.Msg.alert("File Size", String.format('You are trying to upload {0}. Max. allowed upload size is 25 MB', fileSize));
ret = false;
}
return ret;
Last edited by Daniil; Jul 04, 2012 at 11:20 AM.
Reason: [CLOSED]