Skip to content

Commit

Permalink
Merge pull request #294 from votdev/issue_818_handle_error_bp
Browse files Browse the repository at this point in the history
  • Loading branch information
votdev authored Nov 21, 2023
2 parents aaa1c44 + 2b1ac2a commit 1e7ea20
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -611,12 +611,14 @@ export class ObjectDatatablePageComponent implements OnInit {
total: fileList.length
})
);
let loaded = 0;
this.subscriptions.add(
this.s3BucketService
.uploadObjects(this.bid, fileList, this.s3BucketService.buildPrefix(this.prefixParts))
.pipe(finalize(() => this.blockUiService.stop()))
.subscribe({
next: (progress: S3UploadProgress) => {
loaded = progress.loaded;
this.blockUiService.update(
translate(
TEXT(
Expand All @@ -631,8 +633,13 @@ export class ObjectDatatablePageComponent implements OnInit {
);
},
complete: () => {
const message: string =
loaded === fileList.length
? TEXT('{{ total }} object(s) have been successfully uploaded.')
: TEXT('{{ loaded }} of {{ total }} object(s) have been successfully uploaded.');
this.notificationService.showSuccess(
translate(TEXT('{{ total }} object(s) have been successfully uploaded.'), {
translate(message, {
loaded,
total: fileList.length
})
);
Expand Down

0 comments on commit 1e7ea20

Please sign in to comment.