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

cordova-plugin-simple-file-chooser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-simple-file-chooser

Cordova file chooser plugin

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 28 Jan 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