# web-file-explorer

> Browser file explorer boost.

Latest version **0.1.1** (published 2021-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install web-file-explorer
pnpm add web-file-explorer
yarn add web-file-explorer
bun add web-file-explorer
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2021-02-27 |
| First published | 2020-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vladislav Zaynchkovsky |
| Maintainers | zvs001 |
| Keywords | browser, explorer, file, input |

## Links

- npm: https://www.npmjs.com/package/web-file-explorer
- Repository: https://github.com/zvs001/web-file-explorer
- Homepage: https://github.com/zvs001/web-file-explorer#readme
- Issues: https://github.com/zvs001/web-file-explorer/issues
- npm.io page: https://npm.io/package/web-file-explorer

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.20

## 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

- 0.1.1 (latest) — 2021-02-27
- 0.1.0 — 2021-02-23
- 0.0.2 — 2020-11-30
- 0.0.1-rc.2 — 2020-11-30
- 0.0.1-rc.1 — 2020-11-30

## README

Library for using web input file explorer. 

It creates hidden `<input type="file" />` element. Useful for custom uploading buttons, etc. 

[![npm](https://img.shields.io/npm/v/web-file-explorer)](https://www.npmjs.com/package/web-file-explorer)

#### Install: 
- `npm i -S web-file-explorer` 
- `yarn add web-file-explorer`

# Usage

Open file explorer and get file:
```typescript
import fileExplorer from 'web-file-explorer'

const file      = await fileExplorer.getFile()
const imageFile = await fileExplorer.getFile({ acceptImage: true })
```

# API

- `accept` (optional) `string | string[]` - list of allowed mime types
- `acceptImage` (optional) `boolean` -  allow image files. Popular formats only by default.
- `acceptVideo` (optional) `boolean` - allow video files. Popular formats only by default.
- `acceptAudio` (optional) `boolean` - allow audio files. Popular formats only by default.

If there no filters applied. Accept field will be `'*'`

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