Skip to content

Commit

Permalink
feat: Show loading indicator on file assembling (changes after rebase)
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
  • Loading branch information
Koc committed Dec 17, 2024
1 parent 58e4d3f commit 06f3802
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,6 @@ export class Uploader {
try {
// Once all chunks are sent, assemble the final file
await Promise.all(chunksQueue)
this.updateStats()

// re-add upload because it was reset
this._uploadQueue.push(upload)
upload.status = UploadStatus.ASSEMBLING

Check warning on line 520 in lib/uploader.ts

View check run for this annotation

Codecov / codecov/patch

lib/uploader.ts#L520

Added line #L520 was not covered by tests
this.updateStats()

Expand All @@ -535,7 +531,6 @@ export class Uploader {
},
})

this._uploadQueue.push(upload)
upload.status = UploadStatus.FINISHED
this.updateStats()

Check warning on line 535 in lib/uploader.ts

View check run for this annotation

Codecov / codecov/patch

lib/uploader.ts#L535

Added line #L535 was not covered by tests
logger.debug(`Successfully uploaded ${file.name}`, { file, upload })
Expand Down Expand Up @@ -583,6 +578,7 @@ export class Uploader {

// Update progress
upload.uploaded = upload.size
upload.status = UploadStatus.FINISHED

Check warning on line 581 in lib/uploader.ts

View check run for this annotation

Codecov / codecov/patch

lib/uploader.ts#L581

Added line #L581 was not covered by tests
this.updateStats()

// Resolve
Expand Down

0 comments on commit 06f3802

Please sign in to comment.