Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

capacitor-plugin-filedownload-bg

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-plugin-filedownload-bg

a file download plugin for Capacitor3

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

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(...)
  • addListener(...)
  • addListener(...)
  • Interfaces

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

Keywords

FAQs

Package last updated on 04 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc