web: fix incorrect attachment upload progress

This commit is contained in:
Abdullah Atta
2024-07-22 15:30:38 +05:00
parent c8aa8e37cf
commit 0ad382aced

View File

@@ -371,7 +371,7 @@ async function multiPartUploadFile(
const onUploadProgress = (ev: AxiosProgressEvent) => {
reportProgress(
{
total: fileHandle.file.size + ABYTES,
total: fileHandle.file.size + ABYTES * TOTAL_PARTS,
loaded: uploadedBytes + ev.loaded
},
{
@@ -414,7 +414,7 @@ async function multiPartUploadFile(
await fileHandle.addAdditionalData("uploadedChunks", uploadedChunks);
await fileHandle.addAdditionalData("uploadedBytes", uploadedBytes);
onUploadProgress({ bytes: 0, loaded: blob.size });
onUploadProgress({ bytes: 0, loaded: 0 });
}
await axios