diff --git a/src/app/bitstream-page/clarin-bitstream-token-expired/clarin-bitstream-token-expired.component.ts b/src/app/bitstream-page/clarin-bitstream-token-expired/clarin-bitstream-token-expired.component.ts index 8fb1757fcf5..35ed6dc4824 100644 --- a/src/app/bitstream-page/clarin-bitstream-token-expired/clarin-bitstream-token-expired.component.ts +++ b/src/app/bitstream-page/clarin-bitstream-token-expired/clarin-bitstream-token-expired.component.ts @@ -4,6 +4,7 @@ import { Bitstream } from '../../core/shared/bitstream.model'; import { take } from 'rxjs/operators'; import { getBitstreamDownloadRoute } from '../../app-routing-paths'; import { HardRedirectService } from '../../core/services/hard-redirect.service'; +import { HALEndpointService } from '../../core/shared/hal-endpoint.service'; /** * This component shows error that the download token is expired and redirect the user to the Item View page @@ -21,13 +22,14 @@ export class ClarinBitstreamTokenExpiredComponent implements OnInit { constructor( private hardRedirectService: HardRedirectService, + private halService: HALEndpointService ) { } ngOnInit(): void { setTimeout(() => { this.bitstream$.pipe(take(1)) .subscribe(bitstream => { - const bitstreamDownloadPath = getBitstreamDownloadRoute(bitstream); + const bitstreamDownloadPath = this.halService.getRootHref() + getBitstreamDownloadRoute(bitstream); this.hardRedirectService.redirect(bitstreamDownloadPath); }); }, diff --git a/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.ts b/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.ts index 6edc55c33d3..8a29a3b8ba6 100644 --- a/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.ts +++ b/src/app/bitstream-page/clarin-license-agreement-page/clarin-license-agreement-page.component.ts @@ -257,7 +257,7 @@ export class ClarinLicenseAgreementPageComponent implements OnInit { }); let bitstreamDownloadPath = getBitstreamDownloadRoute(bitstream); if (isNotEmpty(downloadToken)) { - bitstreamDownloadPath = bitstreamDownloadPath + '?dtoken=' + downloadToken; + bitstreamDownloadPath = this.halService.getRootHref() + bitstreamDownloadPath + '?dtoken=' + downloadToken; } this.hardRedirectService.redirect(bitstreamDownloadPath); }