fix upload progress indicator

This commit is contained in:
Karol Wypchlo 2020-06-25 16:04:32 +02:00
parent ef7afd4c4e
commit aff564f4a9
1 changed files with 1 additions and 2 deletions

View File

@ -106,8 +106,7 @@ export default function HomeUpload() {
}; };
acceptedFiles.forEach((file) => { acceptedFiles.forEach((file) => {
const onUploadProgress = ({ loaded, total }) => { const onUploadProgress = (progress) => {
const progress = loaded / total;
const status = progress === 1 ? "processing" : "uploading"; const status = progress === 1 ? "processing" : "uploading";
onFileStateChange(file, { status, progress }); onFileStateChange(file, { status, progress });