Created
February 6, 2014 09:18
-
-
Save fedir/8840913 to your computer and use it in GitHub Desktop.
Get total file size before upload with HTML5 File API and jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var totalSize = 0; | |
$("input:file").each(function(){ | |
if($(this)[0].files[0]) { | |
totalSize = totalSize + $(this)[0].files[0].size; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment