Open
Description
Feature Request
Plugin
FileSystem
Description
The FileSystem plugin should support binary data when using appendFile
, readFile
, and writeFile
. An encoding
key could be provided when working with utf8 encoded data.
To represent binary data in JS, Blobs (part of the File API spec) should be used because they best represent file contents: immutable, potentially (but not necessarily) encoded, potentially (but not necessarily) with an associated mime type. Blobs can be converted to ArrayBuffers or streams for alternative use cases.
Platform(s)
- Android
- iOS
- Web (IndexedDB supports Blobs)
Additional Context
- Depends on Support blob/large data capacitor#984
- @diachedelic created a plugin which uses a separate HTTP server for serving binary data: https://github.com/diachedelic/capacitor-blob-writer