Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
36
rated 0 times [  42] [ 6]  / answers: 1 / hits: 98995  / 14 Years ago, sat, november 6, 2010, 12:00:00

I'm trying to ride the HTML5 wave but I'm facing a small issue. Before HTML5 we were checking the file size with flash but now the trend is to avoid using flash in web apps. Is there any way to check the file size in the client side using HTML5?


More From » html

 Answers
589

This works. Place it inside an event listener for when the input changes.



if (typeof FileReader !== undefined) {
var size = document.getElementById('myfile').files[0].size;
// check file size
}

[#95059] Wednesday, November 3, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eanskylerg

Total Points: 524
Total Questions: 107
Total Answers: 100

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
;