# cordova-plugin-simple-file-chooser

> Cordova file chooser plugin

Latest version **3.0.2** (published 2022-01-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-simple-file-chooser
pnpm add cordova-plugin-simple-file-chooser
yarn add cordova-plugin-simple-file-chooser
bun add cordova-plugin-simple-file-chooser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2022-01-28 |
| First published | 2019-02-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Cyph, Inc. |
| Maintainers | harshzalavadiya |
| Keywords | file, chooser, picker, file-chooser, android, ios |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-simple-file-chooser
- Repository: https://github.com/hc-oss/cordova-plugin-simple-file-chooser
- Homepage: https://github.com/hc-oss/cordova-plugin-simple-file-chooser#readme
- Issues: https://github.com/hc-oss/cordova-plugin-simple-file-chooser/issues
- npm.io page: https://npm.io/package/cordova-plugin-simple-file-chooser

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 3.0.2 (latest) — 2022-01-28
- 3.0.1 — 2022-01-19
- 3.0.0 — 2021-11-16
- 2.2.1 — 2019-02-02
- 2.2.0 — 2019-02-02
- 2.0.0 — 2019-02-02

## README

# 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

```sh
cordova plugin add cordova-plugin-simple-file-chooser
```

### Supported Platforms:

- Android
- iOS

### API

```js
/**
  * 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

```js
(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.

---
_Source: https://npm.io/package/cordova-plugin-simple-file-chooser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
