From 27f17b35f964ffeac7822f1857290948e8cbc747 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Wed, 1 Apr 2020 14:51:24 +0200 Subject: [PATCH] 68346: Set upload url after bundle create --- .../bitstreams/upload/upload-bitstream.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts b/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts index 75e70f5610..57f6b4dc55 100644 --- a/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts +++ b/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts @@ -130,6 +130,7 @@ export class UploadBitstreamComponent implements OnInit, OnDestroy { this.translate.instant(this.NOTIFICATIONS_PREFIX + 'bundle.created.title'), this.translate.instant(this.NOTIFICATIONS_PREFIX + 'bundle.created.content') ); + this.setUploadUrl(); }); } @@ -151,7 +152,9 @@ export class UploadBitstreamComponent implements OnInit, OnDestroy { this.uploadFilesOptions.authToken = this.authService.buildAuthHeader(); } // Re-initialize the uploader component to ensure the latest changes to the options are applied - this.uploaderComponent.ngOnInit(); + if (this.uploaderComponent) { + this.uploaderComponent.ngOnInit(); + } }); }