Cordova file chooser plugin.
Branch: master
Clone or download
Latest commit dc4b79f Jan 25, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src explicitly set EXTRA_ALLOW_MULTIPLE to false for now (#6) Jan 24, 2019
www add optional callback interface Jan 24, 2019
LICENSE rename Jul 26, 2018 readme update Aug 21, 2018
package.json version bump Jan 24, 2019
plugin.xml version bump Jan 24, 2019



File chooser plugin for Cordova.

Install with Cordova CLI:

$ cordova plugin add cordova-plugin-chooser

Supported Platforms:

  • Android

  • iOS


 * Displays native prompt for user to select a file.
 * @param accept Optional MIME type filter (e.g. 'image/gif,video/*').
 * @returns Promise containing selected file's raw binary data,
 * base64-encoded data: URI, MIME type, display name, and original URI.
 * If user cancels, promise will be resolved as undefined.
 * If error occurs, promise will be rejected.
chooser.getFile(accept?: string) : Promise<undefined|{
	data: Uint8Array;
	dataURI: string;
	mediaType: string;
	name: string;
	uri: string;

Example Usage

(async () => {
	const file = await chooser.getFile();
	console.log(file ? : 'canceled');

Platform-Specific Notes

The following must be added to config.xml to prevent crashing when selecting large files on Android:

<platform name="android">
		<application android:largeHeap="true" />