1.1.1 • Published 3 years ago

capacitor-plugin-filedownload-bg v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

capacitor-plugin-filedownload

a simple file download plugin for Capacitor3

android ios

Install

npm install capacitor-plugin-filedownload
npx cap sync

eg:

import { FileDownload } from "capacitor-plugin-filedownload";

FileDownload.download({
    uri: "http://www.xxxxx.com/file/rvh.apk",
    fileName: "release.apk"
}).then((res) => {
    console.log(res.path);
}).catch(err => {
    console.log(err);
})

···

API

download(...)

download(options: FileDownloadOptions) => any
ParamType
optionsFileDownloadOptions

Returns: any


addListener(...)

addListener(eventName: 'downloadProgress', listenerFunc: (progress: FileDownloadProgress) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName"downloadProgress"
listenerFunc(progress: FileDownloadProgress) => void

Returns: any


addListener(...)

addListener(eventName: 'downloadStatus', listenerFunc: (status: FileDownloadStatus) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName"downloadStatus"
listenerFunc(status: FileDownloadStatus) => void

Returns: any


Interfaces

FileDownloadOptions

PropType
uristring
fileNamestring
titlestring
descriptionstring
objectIdstring

FileDownloadResponse

PropType
pathstring

FileDownloadProgress

PropType
progressnumber
objectIdstring

PluginListenerHandle

PropType
remove() => any

FileDownloadStatus

PropType
statusstring
objectIdstring

感谢 https://github.com/veluxa/capacitor-plugin-file-downloader

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago