Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 offline storage. File storage? Directories and filesystem API

Tags:

For storing data offline WebApp can use:

  • session storage, "advanced version of cookies"
  • key/value based Web Storage (AKA local/global/offline/DOM storage)
  • sql-based Web SQL Database (deprecated) and Indexed Database API
  • FileReader and FileWriter API (requires user to select files each time the application loads)

But apparently there is no File Storage. Of course, there is a manifest-based caching, but it's just a cache and is not supposed to be used as a user data storage.

Does it mean that the user of WebApp is forced to use some sort of a cloud file storage?

Is there any way to save large files on user's local machine? Or maybe some way to select a local folder web application can use to store user data?

Edit. Security. HTML5 already has the ability to write big portions of data to user's local machine. I don't see any security issues if a browser will provide another, file-based abstraction to store data. It can be some virtual machine, virtual filesystem, whatever.

Hm, I think, it is possible to write JS filesystem and store it as a blob in SQL...

Similar questions.

Update: Hm... recently I've found this and this. Maybe it is what I'm looking for... Yes, it is! See the answer below.

like image 951
Vanuan Avatar asked Oct 14 '10 19:10

Vanuan


1 Answers

At last, I've found it! Here's the answer:

I’ll have the DOMFileSystem with a side of read/write access please wrote:

Eric Uhrhane of Google has been working on the working draft of the File API: Directories and System specification which defines a set of APIs to create a sandboxed filesystem where a web app can read and write data to.

Wow! I'm so excited!

like image 137
Vanuan Avatar answered Oct 12 '22 10:10

Vanuan