Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-file-upload-preview) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Note -> Install v0.1.4 or above
Usage
Install
npm install react-file-upload-preview@0.1.4
Import
import { FileUpload } from 'react-file-upload-preview/dist';
Usage
<FileUpload handleFileUpload={(e)=>console.log(e, event)} accept=".jpg, .png" />
Demo
| prop | type | usage |
|---|---|---|
| handleFileUpload | function | to get the event for the file uploaded |
| inputId | string | input id for your input field |
| accept | string | restrict types of file you want to upload |
| uploadTriggerClasses | string | to add css to upload icon |
| labelContainerClasses | string | to add css to label container |
| customPreviewUrl | string | custom Preview URL |
| customFileType | string | to initialize and prefill the image/video/pdf |
| customUploadIcon | string | custom upload icon URL |