0.1.1 • Published 5 years ago
web-file-explorer v0.1.1
Library for using web input file explorer.
It creates hidden <input type="file" /> element. Useful for custom uploading buttons, etc.
Install:
npm i -S web-file-exploreryarn add web-file-explorer
Usage
Open file explorer and get file:
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 typesacceptImage(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 '*'
0.1.1
5 years ago
0.1.0
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago
0.0.1-rc.2
5 years ago
0.0.1-rc.1
5 years ago