FileReader API working in jsFiddle but not from local file

I'm working on a Chrome / Firefox extension that will use the file API to store files locally. I'm trying to run the example and run it, but I'm having problems with Chrome. Can anyone explain why this jsFiddle works great, but the exact same code when run from a local file does not work. Please note that it works fine in Firefox and not Chrome. Any ideas?


source to share

3 answers

Chrome has unusually restrictive internet security; many things like Ajax won't work when run locally. This is one of them. You can work around this issue either with a local web selector like @ephemient suggested, or you can run Chrome in unsafe mode for testing:

chrome.exe --disable-web-security




Uh-huh. Chrome SOP prevents almost everything file://

from working [1] . Use a local web server instead.



If you are using chrome. Run chrome from the command line with the --allow-file access flag, from files chrome does not support local file access without this flag.



All Articles