Skip to content
This repository was archived by the owner on Oct 8, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ npm install react-file-reader --save
```

## ChangeLog
- 1.1.3
- adds the ability to accept multiple fileTypes as an array
- 1.1.2
- fixes an issue where a file couldn't be uploaded twice
- fixes an issue where the same file couldn't be selected twice in a row
- 1.1.1
- changes the way we're hiding the input, as previously it would break parent elements that were positioned absolutely.
- 1.1.0
Expand All @@ -31,7 +33,7 @@ npm install react-file-reader --save

## Props
### Default Props
- fileTypes: 'image/*'
- fileTypes: 'image/\*'
- multipleFiles: false
- base64: false

Expand All @@ -52,6 +54,7 @@ npm install react-file-reader --save
- a `boolean` enforce single file or multiple file selection
- fileTypes
- React File Reader supports all [HTML input accept attributes](https://www.w3schools.com/tags/att_input_accept.asp).
- Can be passed as a string or an array

## Usage
### Import React File Reader
Expand Down Expand Up @@ -81,7 +84,7 @@ handleFiles = (files) => {
console.log(files.base64)
}

<ReactFileReader base64={true} multipleFiles={true} handleFiles={this.handleFiles}>
<ReactFileReader fileTypes={[".csv",".zip"]} base64={true} multipleFiles={true} handleFiles={this.handleFiles}>
<button className='btn'>Upload</button>
</ReactFileReader>
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-file-reader",
"version": "1.1.2",
"version": "1.1.3",
"description": "A flexible ReactJS component for handling styled HTML file inputs.",
"main": "index.js",
"repository": "git@github.com:GrillWork/react-file-reader.git",
Expand Down