Posted By

yingyi on 07/29/11


Tagged

javascript html5


Versions (?)

Get filesize of file without uploading


 / Published in: JavaScript
 

  1. function checkFileSize() {
  2. if (typeof FileReader !== "undefined") {
  3. var size = document.getElementById('myfile').files[0].size;
  4. //do something with size
  5. }
  6. }

Report this snippet  

You need to login to post a comment.