capacitor-file-storage v0.0.7
Capacitor file storage
The goal of this plugin is to allow mobile devices to keep files into the devices storage. The web part will store the files into the browser cache through the Cache API :
The plugin is publish to npm here
Installation into a capacitor project
1 . Install the plugin
npm install @naistro/capacitor-file-storage2 . Update Capacitor registery
npx cap updateTesting
For testing purpose you can link directly the node package to the project you are using.
Capacitor plugin
On the capacitor plugin you have to execute:
npm linkAnd you need to build or watch the plugin:
npm run build
# OR
npm run watchProject you are using
npm link capacitor-file-storageAnd then you need to rebuild the project via ng build or ng serve.
Publishing a new version
Create a github token for your user

Copy the token
- log in to npm.pkg.github.com
npm login --registry=https://npm.pkg.github.comUsername: GitHub-username
Password: your-personal-access-token-from-step-2Plugin expected API
Methods
Return the plaform where the methode has been called 'web' | 'ios' | 'android'
getPlatfrom(): Promise<string>Return the current platform
getInfo(): Promise<Info>;Download and save the file
writeFile(fileUrl : string): Promise<File>;Return a specific file through via its URL
getFile(fileId : string): Promise<Response>;List all the applications files
listFiles(): Promise<ReadonlyArray<Response>>;Delete a specific file via its URL
deleteFile(fileId : string): Promise<boolean>;Delete the file which is the oldest
deleteOldestFile(fileId : string): Promise<boolean>;Delete all the files
deleteAllFiles(): Promise<boolean>;
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago