- From: Feross Aboukhadijeh <notifications@github.com>
- Date: Sat, 07 Jan 2017 16:39:26 -0800
- To: w3c/filesystem-api <filesystem-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/filesystem-api/issues/8/271120715@github.com>
> @nolanlawson I've heard that one much-desired feature is a streaming interface to and from the filesystem, which could arguably be added to IDB rather than this spec or any similar filesystem spec. @feross are you looking for something similar for WebTorrent? Streaming **reads** are already possible today via drag-drop or a File Input. On the other hand, the following are not currently possible, and are extremely important for the web platform: 1. Streaming **writes** to files on disk. - Right now, to save files to disk in WebTorrent, we stream data into a pre-allocated typed array, wrap it in a Blob, `URL.createObjectUrl`, then click that link. This **imposes a max file size of the largest allowed typed array (~1GB)** and requires the **entire data to live in memory** until it's ready to be saved. - Streaming writes would let us do file transfers over WebRTC and offer "save this file" functionality **without keeping the whole file data in memory**. 2. Persistent file/folder access. - To explain the use case of this, I'll just quote: - > Today, if a web site wants to create experiences involving local files (document editor, image compressor, etc.) they are at a disadvantage to native apps. A web site must ask the user to reopen a file every time they want to edit it. After opening, the site can only save changes by re downloading the file to the Downloads folder. A native app, by comparison, can maintain a most recently used list, auto save, and save files anywhere the user wants. (from [WICG/writable-files](https://github.com/WICG/writable-files)) The best attempt to address these both issues is actually [WICG/writable-files](https://github.com/WICG/writable-files), which I quoted from above. There is a more detailed explainer about the idea here: https://github.com/WICG/writable-files/blob/master/EXPLAINER.md -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/filesystem-api/issues/8#issuecomment-271120715
Received on Sunday, 8 January 2017 00:40:00 UTC