Last active
March 12, 2019 22:28
-
-
Save kylebebak/41a42a429788dd7391948b95760f74c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Dropzone from 'react-dropzone-uploader' | |
const Uploader = () => { | |
return ( | |
<Dropzone | |
getUploadParams={() => ({ url: 'https://mybucket.s3.amazonaws.com' })} // specify upload params and url for your files | |
onChangeStatus={({ meta, file }, status) => { console.log(status, meta, file) }} | |
onSubmit={(files) => { saveFileUrlsToMyServer(files) }} // e.g., submit the uploaded file URLs to your backend | |
accept="image/*,audio/*,video/*" | |
/> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment