- PropTypes via the prop-types package (thanks @13colours).
- Fixed a bug with file url creation (thanks @davidascher).
- Fixed a build error caused by babel picking up the wrong config.
- The prop
upload
is used to specify options forreact-s3-uploader
(replacesuploaderOptions
). - Readme is better.
- Refactoring to clean up this abomination.
- Props have been cleaned up.
- Other props are pased to
react-dropzone
. - The
fileUrls
andfilenames
props have been replaced byuploadedFile
objects. EachuploadedFile
object has the filename, full s3 url (asfileUrl
) and a reference to the original file descriptor from the upload. - Children have state information passed again via the
uploadedFiles
prop. - Passing children props can be disabled by setting the
passChildrenProps
prop to false to avoid React warnings about unused props.
- Upgraded react-s3-uploader to ^4.0.0
- Removed underscored props in favour of camelCase only.
- Upgraded
react-s3-uploader
to v3.3.0 - Added some props:
uploaderOptions
andpreprocess
- Fix bug caused by using _.map without importing it
- props.children no longer receive the
fileUrl
,s3Url
,filename
,progress
,error
,imageStyle
props. If thefileComponent
prop is specified it will receive these props. - maxFileSize and minFileSize are passed to the
react-dropzone
component, which handles validation - multiple files are handled better. Props named
fileUrls
andfilenames
are passed to thefileComponent
, with an entry per file uploaded.
- Accepts an prop named
onDrop
, a function to be called with the files object when files are dropped.
- Removed dependency on react-bootstrap
- New props:
progressComponent
, a react component to render progress. Is provided a prop calledprogress
with the current uploader progress percentage as an int (0-100).fileComponent
prop to do the same for rendering an uploaded file (not an image).isImage
a function that should return true if a filename represents an image. Default isfilename => filename && filename.match(/\.(jpeg|jpg|gif|png|svg)/i)
- If a child component is present it's only passed these props:
fileUrl, s3Url, filename, progress, error, imageStyle
- Update React dependecy to include 15.x.x
- react-bootstrap dependency updated to ^0.29.0
- Renamed
host
option toserver
to match react-s3-uploader
- Pass accept prop to Dropzone
- Supports a display component via a child element.
- readme