Skip to content

Instantly share code, notes, and snippets.

@kylebebak
Last active March 12, 2019 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebebak/41a42a429788dd7391948b95760f74c4 to your computer and use it in GitHub Desktop.
Save kylebebak/41a42a429788dd7391948b95760f74c4 to your computer and use it in GitHub Desktop.
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