Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vitorluizc/select-files
Virtually creates a file input element (<input type="file" />), triggers it and returns selected files.
https://github.com/vitorluizc/select-files
dom file file-input filelist input-file javascript select select-file select-files typescript upload upload-file upload-files
Last synced: about 1 month ago
JSON representation
Virtually creates a file input element (<input type="file" />), triggers it and returns selected files.
- Host: GitHub
- URL: https://github.com/vitorluizc/select-files
- Owner: VitorLuizC
- License: mit
- Created: 2019-09-03T04:09:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T09:30:13.000Z (almost 2 years ago)
- Last Synced: 2024-10-17T07:09:04.767Z (2 months ago)
- Topics: dom, file, file-input, filelist, input-file, javascript, select, select-file, select-files, typescript, upload, upload-file, upload-files
- Language: TypeScript
- Homepage:
- Size: 1.29 MB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# selectFiles
[![Build Status](https://travis-ci.org/VitorLuizC/select-files.svg?branch=master)](https://travis-ci.org/VitorLuizC/select-files)
[![License](https://badgen.net/github/license/VitorLuizC/select-files)](./LICENSE)
[![Library minified size](https://badgen.net/bundlephobia/min/select-files)](https://bundlephobia.com/result?p=select-files)
[![Library minified + gzipped size](https://badgen.net/bundlephobia/minzip/select-files)](https://bundlephobia.com/result?p=select-files)Virtually creates a file input element (``), triggers it and returns selected files.
```js
import selectFiles from 'select-files';selectFiles({ accept: 'image/*', capture: 'camera' }).then(files => {
// ...
});
```## Installation
This library is published in the NPM registry and can be installed using any compatible package manager.
```sh
npm install select-files --save# For Yarn, use the command below.
yarn add select-files
```### Installation from CDN
This module has an UMD bundle available through JSDelivr and Unpkg CDNs.
```html
// UMD module is exposed through the "selectFiles" global function.
selectFiles({ multiple: true }).then(files => {
console.log(files);
});```
## Documentation
[Documentation generated from source files by Typedoc](./docs/README.md).
## License
Released under [MIT License](./LICENSE).