astro / astro/bitford

Improvement proposal : use DeviceStorage API as an alternative to FileSystem API

Open
#1 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
95
Forks
14
PR merge metrics
No merged PRs in 30d

Description

It's a request I had made for https://github.com/kzahel/jstorrent , but you already know it has disappeared.

The FileSystem API is only available on Chrome.
But Mozilla implemented the DeviceStorage API that should let you do the same things. You get File objects, on which you can read/write some slices.
See https://developer.mozilla.org/en-US/docs/Web/API/DeviceStorage
and https://wiki.mozilla.org/WebAPI/FileHandleAPI#Atomic_increment_of_a_counter_somewhere_in_the_file

This DeviceStorage API is currently implemented on Firefox OS (you can test it on the Firefox OS Simulator : https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/ ), and is planned to be available on Firefox Android and desktop. See https://wiki.mozilla.org/index.php?title=WebAPI

It would make your app available on some more devices.
And it also might let you win a Firefox OS phone : https://hacks.mozilla.org/2013/09/calling-all-app-ports/ ;-)

NB : it would also be very useful for an application I made, for which the user needs to download big files with bittorrent. For now it's not possible to download them from the device itself. See https://github.com/mossroy/evopedia-html5/issues/19

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the app's use of the Chrome-only FileSystem API, then read the linked Mozilla DeviceStorage and FileHandle API documentation. Test the proposed API in the Firefox OS Simulator and determine whether it can support the app's file operations; done means the app works on the additional target devices without losing existing functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.