Socket
Socket
Sign inDemoInstall

cordova-plugin-simple-file-chooser

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cordova-plugin-simple-file-chooser

Cordova file chooser plugin


Version published
Weekly downloads
17
decreased by-34.62%
Maintainers
1
Install size
12.7 kB
Created
Weekly downloads
 

Readme

Source

Chooser

Overview

This plugin is an forked version of cordova plugin chooser that provides multiple file selection functionality and removes base64 functionality as we can use ionic native file plugin to get file directly

Installing

cordova plugin add cordova-plugin-simple-file-chooser

Supported Platforms:

  • Android
  • iOS

API

/**
  * Displays native prompt for user to select one or more files.
  *
  * @param accept Optional MIME type filter (e.g. 'image/gif,video/*').
  *
  * @returns Promise containing selected files' information,
  * MIME type, display name, and original URI.
  *
  * If user cancels, promise will be resolved as undefined.
  * If error occurs, promise will be rejected.
  */
chooser.getFiles(accept?: string) : Promise<undefined|{
	mediaType: string;
	name: string;
	uri: string;
}>

Example Usage

(async () => {
  const file = await chooser.getFile();
  console.log(file);
})();

Note

If calling in typescript don't use types instead use direct javascript by declare var chooser on your ts file.

Keywords

FAQs

Last updated on 28 Jan 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc