@zenkit-dev/cordova-plugin-simple-chooser

2.0.1 • Public • Published

Simple Chooser

Overview

A simple file chooser plugin for Cordova.

Based on cordova-plugin-simple-chooser, but without using Promise and without loading the file data (can be done with cordova-plugin-file).

Install with Cordova CLI:

cordova plugin add https://github.com/zenkit/cordova-plugin-simple-chooser#v2.0.1

Supported Platforms:

  • Android

  • iOS

API

chooser.chooseFile(successCallback, errorCallback, [accept])

successCallback

Type: function

The success callback will be called with the information of the picked file

    {
        uri: 'string',
        name: 'string',
        mediaType: 'string',
    }

errorCallback

Type: function

Will be called if an error occurs or the user cancels the picker

accept

Type: string

Optional MIME type filter (e.g. 'image/gif,video/*').

Package Sidebar

Install

npm i @zenkit-dev/cordova-plugin-simple-chooser

Weekly Downloads

2

Version

2.0.1

License

Apache-2.0

Unpacked Size

10.7 kB

Total Files

7

Last publish

Collaborators

  • zenkit-dev