We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update meta.percent that comes from fileWithMeta? I building a custom progress.
onChangeStatus is called on "uploading" and stops until "done", meas 0% and 100%
Thanks
The text was updated successfully, but these errors were encountered:
Hay, this is how I do it. Hope its help
const Standard = () => { const [_updatePreview, setUpdatePreview] = useState<any>({}) const getUploadParams: IDropzoneProps['getUploadParams'] = () => { return { url: 'https://httpbin.org/post' } } const handleChangeStatus: IDropzoneProps['onChangeStatus'] = (file, status, allFiles) => { if (file.xhr) { file.xhr.upload.onprogress = function (e) { setUpdatePreview({ total: e.total, loaded: e.loaded, }) } } setUpdatePreview(status); } const handleSubmit: IDropzoneProps['onSubmit'] = (files, allFiles) => { console.log(files.map(f => f.meta)) allFiles.forEach(f => f.remove()) } return ( <Dropzone getUploadParams={getUploadParams} onChangeStatus={handleChangeStatus} onSubmit={handleSubmit} styles={{ dropzone: { minHeight: 200, maxHeight: 250 } }} /> ) }
Sorry, something went wrong.
No branches or pull requests
How to update meta.percent that comes from fileWithMeta? I building a custom progress.
onChangeStatus is called on "uploading" and stops until "done", meas 0% and 100%
Thanks
The text was updated successfully, but these errors were encountered: