Skip to content

Add ability to read only part of a file. #19

@HarelM

Description

@HarelM

Feature Request

Given a File, or a file URI, allow a developer to read only part of the file.
This is the equivalent of the slice method of File or Blob.

Plugin

Filesystem

Description

I would like to migrate from cordova-file-plugin to this capacitor plugin, but I'm not sure I can do that as I'm not sure all my current usages are covered by this plugin.

Platform(s)

iOS & Android

Preferred Solution

Return an object that follows the File API to allow using the same code for files that are stored on the device and also files that are added to an <input type="file" ... /> HTML element.

Alternatives

Continue using cordova file plugin :-(

Additional Context

The following code is the code I would like to migrate, there's not a lot of code there, but it would be great if I could stop using cordova plugins:

https://github.com/IsraelHikingMap/Site/blob/ac0618e4af3fd4832855a1bf4acd48c28069563f/IsraelHiking.Web/src/application/services/pmtiles.service.ts

https://github.com/IsraelHikingMap/Site/blob/ac0618e4af3fd4832855a1bf4acd48c28069563f/IsraelHiking.Web/src/application/services/file.service.ts

I can summarize the file API that are used in the above two services if that helps, but I think a wider context of how they are used is better.
Let me know if there's anything I can do to help out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions