glitch-javascript-sdk 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/util/Requests.ts +2 -2
package/package.json
CHANGED
package/src/util/Requests.ts
CHANGED
|
@@ -255,10 +255,10 @@ class Requests {
|
|
|
255
255
|
onUploadProgress: (progressEvent) => {
|
|
256
256
|
const currentChunkProgress = progressEvent.loaded; // Bytes uploaded of the current chunk
|
|
257
257
|
// Calculate the total uploaded size including previous chunks and the current chunk's progress
|
|
258
|
-
totalUploaded
|
|
258
|
+
const totalProgress = totalUploaded + currentChunkProgress;
|
|
259
259
|
|
|
260
260
|
if(onProgress){
|
|
261
|
-
onProgress(fileSize,
|
|
261
|
+
onProgress(fileSize, totalProgress);
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
});
|