fix upload progress indicator
This commit is contained in:
parent
ef7afd4c4e
commit
aff564f4a9
|
@ -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 });
|
||||||
|
|
Reference in New Issue