Read File content

758 views
Skip to first unread message

Sandip Bhavsar

unread,
Dec 14, 2012, 9:27:32 AM12/14/12
to ang...@googlegroups.com
Hello All,

I used input file control to upload file. I have to read content of uploaded file. I have executed below code to read it.

 var reader = new FileReader();
    var f = ele.files[0];
    reader.onload = function (e) {
        console.log(e.target.result);
    };
    var content = reader.readAsText(f);
    alert(content);

It is working fine in chrome but not working in IE9 as IE9 is not supported FileReader.

PLease help to work in IE9 as well.

Thanks in advance !!!!

Regards,
Sandip Bhavsar

ganaraj p r

unread,
Dec 14, 2012, 9:29:54 AM12/14/12
to ang...@googlegroups.com
http://stackoverflow.com/questions/11089897/shim-for-filereader-in-ie-9

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
 
 



--
Regards,
Ganaraj P R

Sandip Bhavsar

unread,
Dec 14, 2012, 9:34:35 AM12/14/12
to ang...@googlegroups.com
Thanks for ur reply.

Is it possible without including extra JS file ?

ganaraj p r

unread,
Dec 14, 2012, 9:44:53 AM12/14/12
to ang...@googlegroups.com
Nope. Filereader is not really supported natively on IE.. 

So... 
Reply all
Reply to author
Forward
0 new messages