These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:20 pm Advanced search

NOT_READABLE_ERR returns when using FileReader

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

NOT_READABLE_ERR returns when using FileReader

Postby lth0721 » Thu Dec 09, 2010 9:10 am

Hi,

I am study FileReader in HTML5.
And I followed tutorials in http://www.html5rocks.com/tutorials/file/dndfiles/.
Now, I am trying the "Reading files" example in this tutorial.
The problem is that, when i use a FileReader to read a image in my local files, NOT_READABLE_ERR returns.
1. when i try the tutorial online, it's ok and images are displayed.
2. i downloaded the tutorial page, and run it in my computer, NOT_READABLE_ERR returns.
3. all above are implemented in Chrome browser.
4. So, I opened the local page in FireFox, it worked.

Now, anybody can give me an idea about this case?
lth0721
<h6>
 
Posts: 1
Joined: Thu Dec 09, 2010 9:01 am

Re: NOT_READABLE_ERR returns when using FileReader

Postby markmurphy » Wed Mar 09, 2011 12:18 am

I too had this issue in Chrome.

I was testing sample code from the "file://" scheme (loading web page directly in browser from file system). The code was not working and returning a the NOT_READABLE_ERR error.

However, when I ran the exact same code, same location on file system, etc via apache, it worked.

I'm only guessing, but there must be a security violation in Chrome when trying to use FileReader in code where the window is from the "file://" scheme.

Firefox did not have this issue.
markmurphy
<h6>
 
Posts: 1
Joined: Wed Mar 09, 2011 12:11 am

Postby zcorpan » Wed Mar 09, 2011 9:27 am

Yeah, Chrome is anal about file://. You need to enable some flag to relax the file:// restrictions in Chrome for testing.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests