Bug 254726
| Summary: | File System Standard: WebKit does not implement `FileSystemFileHandle.createWritable()` and `FileSystemWritableFileStream` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Thomas Steiner <tomac> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | 03_placid_daft, amanisalim, benjamin, casistaken, chrisguttandin, daxpedda, jozefchutka, karlcow, mjo2089, sihui_liu, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 231706 | ||
Thomas Steiner
The following test fails in WebKit:
- 'createWritable' in FileSystemFileHandle.prototype
- FileSystemWritableFileStream is undefined
Spec:
- https://fs.spec.whatwg.org/#api-filesystemfilehandle-createwritable
- https://fs.spec.whatwg.org/#api-filesystemwritablefilestream
I also want to report a small documentation bug: https://webkit.org/blog/12257/the-file-system-access-api-with-origin-private-file-system/#:~:text=FileSystemHandle%2C%20which%20represents%20an%20entry%20in%20the%20file%20system.%20It%20is%20available%20in%20Worker%20and lacks the word `Window`.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/107697642>
Alex Titarenko
I'm really interested in this functionality to be implemented in WebKit.
I'm working on a note-taking app for the web. Currently, all user's data is stored in IndexedDb, which has a lot of limitations. I want to use instead the origin private file system to store users' notes and attachments which later will be synced with Git. For my use case, It's not really practical to use WebWorker (the only supported solution for now in WebKit) just to save notes and attachments, also it creates some overhead with transferring data between the main thread and WebWorker.
This is already supported in Chromium-based browsers and it would be great to see this in WebKit
amanisalim
I also need this for my own vocabulary PWA. It has many features which I miss on every other App. I have to save serialized Jsons and read them, when I am offline.
I tried it with Chrome (Linux) and it works as expected.
The PWA works great on my iPhone and iPad when I am online, but I need it offline. Now I have to try the other method with the webworker…
halfmatthalfcat
Also would like to throw my support behind this - blocking current work.
Benjamin Golinvaux
This bug makes it really difficult to write reliable cross-browser apps. I very interested in this fix, too.
Thanks!
casistaken
Jimmy Warting aka Endless managed to polyfill this functionality in his `native-file-system-adapter`, safari implements writes via `fileHandle.createSyncAccessHandle()` but only inside workers, so he exposed that functionality in the main thread with some magic, simply `import 'native-file-system-adapter/src/FileSystemFileHandle.js'` and you should be good to go.
More info: https://github.com/jimmywarting/native-file-system-adapter
Karl Dubost
See https://github.com/WebKit/WebKit/commit/92cb5665c378bef8d73a61a782ad57291520f77d
* 'createWritable' in FileSystemFileHandle.prototype
Returns true in STP 219.
* FileSystemWritableFileStream is defined.
Probably can be marked as a duplicate of Bug 283841
Karl Dubost
*** This bug has been marked as a duplicate of bug 283841 ***