[英]How can I get a file size before upload file in IE?
I'm trying to get a file size before upload file in IE without ActiveX or like this. 我正在尝试在没有ActiveX或类似的IE中上传文件之前获取文件大小。
I already read lots of questions and answers and they said it is impossible. 我已经阅读了很多问题和答案,他们说这是不可能的。
However, I found that Plupload which is jquery file upload library, 但是,我发现Plupload是jquery文件上传库,
can get a file size in IE 7+ without AcviceX or Ajax submit to a server. 无需AcviceX或Ajax提交到服务器即可在IE 7+中获取文件大小。
Have any clue to get a file size in IE7+ or how Plupload can get a file size? 有什么线索可以获取IE7 +中的文件大小,或者Plupload如何获取文件大小?
<input type="file" id="myFile" />
$('#myFile').bind('change', function() {
//this.files[0].size gets the size of your file.
alert(this.files[0].size);
});
Try with Above Code 尝试上面的代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.