1

I am trying to find the file size before upload

i use the code file[0].size but it is not working IE

Please help me to get the file size in IE To

Thank You

0

1 Answer 1

1

That works in IE10. But, since the size property of File objects is HTML5 specific, there's no chance you can do that with pure Javascript in IE9 and older. Yes, that sucks.

You'll have to rely on some Flash solutions or something like that.

Sign up to request clarification or add additional context in comments.

7 Comments

No prob, sorry for not being of any help. By the way, use double asterisks to render something bold here on StackExchange, like **something bold** => something bold.
@Stano What should that (bad) fiddle prove or do?
@MaxArt That (good) fiddle is only example and simply proves that filesize counting doesn't work in Explorer. Didn't test it carefully in Explorer and so you are right, it was overcomplicated and that Browser Checking code was redundant. So the simplified fiddle is here: jsfiddle.net/9RBes/3
@Stano I guess OP already figured that out. The fiddle is indeed bad because of the UA string sniffing instead of the feature check.
Oh yeah, Max you're right, UA string is not reliable checking. But that 3rd fiddle above i guess is already ok, isn't it? Please can you explain me, what does it mean OP ? Operator? Or what? Is it some English internet slang?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.