Open ebidel opened 12 years ago
Also, I don't believe webkitStorageInfo is available in a worker, so there's no way to request quota for the first time when using persistent storage.
Hey Eric,
Have you done any more digging on using filer.js in a web worker context? We're using filer.js to store audio samples and are always looking for opportunities to pull things out of the main process. I see that this is is an old issue, so I figured I'd reach out to you before looking into it too deeply. If you have any new insights or recommendations, I'd be happy to dig into this approach a bit.
--oops, just saw your 'Dealing with Quota' section on http://www.html5rocks.com/en/tutorials/file/filesystem-sync/ . Would this approach be something you'd think about rolling into filer.js? If so and we can get it working, I can take a stab at putting together a PR for it.
This library and your articles on Filesystem API are great - thanks for putting them out there!
Unfortunately I haven't. I believe things should, but haven't spent the time to properly test. The one issue (noted above) is that you'd have to do quota checks outside of the worker...unless that API was added recently.
If filer.js doesn't work out of the box, I'd imagine only a few small tweaks would be required.
Ok awesome, thanks. I just realized that this issue was probably referring to filer.js being imported wholesale into a worker, so I'm not sure that extending it to make the quota call outside the worker will fit in the library's scope. Thanks for the quick reply - I'll report back if I find anything interesting.
I believe the lib can be used, but making it more friendly for workers might be worthwhile. There's a synchronous API.