2.0.1 • Published 2 years ago
@eoscz/capacitor-plugin-native-file-downloader v2.0.1
capacitor-plugin-native-file-downloader
Capacitor plugin for downloading files using native apis. Currently available only on web and Android.
Install
npm install @eoscz/capacitor-plugin-native-file-downloader
npx cap syncAPI
scheduleFileDownload(...)
scheduleFileDownload(options: ScheduleFileDownloadOptions) => Promise<ScheduleFileDownloadResult>Schedule file to be downloaded. Returned Promise resolves when the download is scheduled (not when download completes).
| Param | Type |
|---|---|
options | ScheduleFileDownloadOptions |
Returns: Promise<ScheduleFileDownloadResult>
Interfaces
ScheduleFileDownloadResult
| Prop | Type | Description |
|---|---|---|
downloadId | string | The internal identifier of scheduled download process. |
ScheduleFileDownloadOptions
| Prop | Type | Description |
|---|---|---|
url | string | Url of the file to be downloaded. e.g. https://example.com/downloads/file.pdf |
fileName | string | Name of the downloaded file (including extension). e.g. my-file.pdf |