This repository was archived by the owner on Oct 8, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ npm install react-file-reader --save
1414```
1515
1616## ChangeLog
17+ - 1.1.3
18+ - adds the ability to accept multiple fileTypes as an array
1719 - 1.1.2
1820 - fixes an issue where the same file couldn't be selected twice in a row
1921 - 1.1.1
@@ -31,7 +33,7 @@ npm install react-file-reader --save
3133
3234## Props
3335### Default Props
34- - fileTypes: 'image/* '
36+ - fileTypes: 'image/\ * '
3537 - multipleFiles: false
3638 - base64: false
3739
@@ -52,6 +54,7 @@ npm install react-file-reader --save
5254 - a ` boolean ` enforce single file or multiple file selection
5355- fileTypes
5456 - React File Reader supports all [ HTML input accept attributes] ( https://www.w3schools.com/tags/att_input_accept.asp ) .
57+ - Can be passed as a string or an array
5558
5659## Usage
5760### Import React File Reader
@@ -81,7 +84,7 @@ handleFiles = (files) => {
8184 console .log (files .base64 )
8285}
8386
84- < ReactFileReader base64= {true } multipleFiles= {true } handleFiles= {this .handleFiles }>
87+ < ReactFileReader fileTypes = {[ " .csv " , " .zip " ]} base64= {true } multipleFiles= {true } handleFiles= {this .handleFiles }>
8588 < button className= ' btn' > Upload< / button>
8689< / ReactFileReader>
8790```
Original file line number Diff line number Diff line change 11{
22 "name" : " react-file-reader" ,
3- "version" : " 1.1.2 " ,
3+ "version" : " 1.1.3 " ,
44 "description" : " A flexible ReactJS component for handling styled HTML file inputs." ,
55 "main" : " index.js" ,
66 "repository" :
" [email protected] :GrillWork/react-file-reader.git" ,
You can’t perform that action at this time.
0 commit comments