Reading local files in JavaScript (HTML5)
21–26 of 26 posts
Re: Reading local files in JavaScript (HTML5)
#22Earlier quoted context omitted.
When you say cross-domain AJAX, do you mean JSONP or proxying, or is there another technique I'm not aware of?
https://developer.mozilla.org/en/http_access_control
Does have experience with the CORS "partial support" in IE?
[http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing]
Re: Reading local files in JavaScript (HTML5)
#23Earlier quoted context omitted.
well you can always use file system api. http://www.html5rocks.com/en/tutorials/file/filesystem/ but its chrome only
For what it's worth, TiddlyWiki can save itself on the filesystem even with Firefox (user gets prompted to allow access). I don't know how it works though and when I tried it seemed to be quite buggy.
Re: Reading local files in JavaScript (HTML5)
#24Earlier quoted context omitted.
well you can always use file system api. http://www.html5rocks.com/en/tutorials/file/filesystem/ but its chrome only
What about security? I assume its not possible to read and write arbitrary files in the fs?
If you're calling requestFileSystem() for the first time, new storage is created for your app. It's important to remember that this file system is sandboxed, meaning one web app cannot access another app's files. This also means you cannot read/write files to an arbitrary folder on the user's hard drive (for example My Pictures, My Documents, etc.).
Re: Reading local files in JavaScript (HTML5)
#25Earlier quoted context omitted.
What about security? I assume its not possible to read and write arbitrary files in the fs?
From parent's link: If you're calling requestFileSystem() for the first time, new storage is created for your app. It's important to remember that this file system is sandboxed, meaning one web app cannot access another app's files. This also means you cannot read/write files to an arbitrary folder on the user's hard drive (for example My Pictures, My Documents, etc.).
Re: Reading local files in JavaScript (HTML5)
#26The spec changes quiet often and if you do the javascript file stuff alot (my startup deals with local files with javascript so i use js for files alot) you will come across something that has been changed from what it is on html5rocks. It gets ugly very quickly. When i started it, the condition was alot worse, there was practically no one writing any tutorials. Your only option was to reverse engineer the spec draft…
I've found the same thing. I'm holding off on implementing some of this stuff (outside of prototypes) because it seems Safari/IE support is missing and there isn't a decent polyfill that I'm aware of.