2

I got a javascript code that works in FF, chrome and other browser except IE

Here it is

    var inputfile = document.getElementById('inputfilename');
    var filetype = inputfile.files[0].type;
    var filesize = inputfile.files[0].size;
    var filename = inputfile.files[0].name;

Now the variable filetype, filesize and filename is undefined in IE
So how to get those three property in IE ?
Any help will be appreciated.

fiddle : http://jsfiddle.net/vY9y8/

2
  • why dont you create a jsfiddle and share a link? so that it will be easy to debug. Commented Nov 15, 2012 at 11:44
  • Ok I added a jsfiddle thanks man Commented Nov 15, 2012 at 12:08

1 Answer 1

4

Option 1: Wait for IE 10 (which should support the bleeding edge File API spec)

Option 2: Use another technology that can access that sort of information. Possible Flash or a signed Java applet.

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

2 Comments

oh so IE cannot get those property within the inputfile html tag ?
No, it doesn't support File API. Microsoft are quite conservative about implementing new specifications in IE these days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.