react-drag-n-drop-to-s3
React component to drag and drop files and upload them to AWS S3. Based on react-dropzone and react-s3-uploader.
Install
$ npm install react-drag-n-drop-to-s3 react-dropzone
Example
const UploadAvatar = <DragNDropToS3 dropzoneProps= accept: 'image/png' maxSize: 2000000 s3UploaderProps= getSignedUrl: APIsgetSignedURL autoUpload: true console > <div> <p>Drop your avatar here or click to upload</p> <ul> acceptedFiles </ul> </div> </DragNDropToS3>
Props
Prop | Description | Type | Required |
---|---|---|---|
dropzoneProps | For the list of available options, see react-dropzone | Object |
No |
s3UploaderProps | For the list of available options, see react-s3-uploader | Object |
No |