mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
web: fix incorrect attachment upload progress
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user