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) => {
const onUploadProgress = ({ loaded, total }) => {
const progress = loaded / total;
const onUploadProgress = (progress) => {
const status = progress === 1 ? "processing" : "uploading";
onFileStateChange(file, { status, progress });