File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
clarin-bitstream-token-expired
clarin-license-agreement-page Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { Bitstream } from '../../core/shared/bitstream.model';
44import { take } from 'rxjs/operators' ;
55import { getBitstreamDownloadRoute } from '../../app-routing-paths' ;
66import { HardRedirectService } from '../../core/services/hard-redirect.service' ;
7+ import { HALEndpointService } from '../../core/shared/hal-endpoint.service' ;
78
89/**
910 * 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 {
2122
2223 constructor (
2324 private hardRedirectService : HardRedirectService ,
25+ private halService : HALEndpointService
2426 ) { }
2527
2628 ngOnInit ( ) : void {
2729 setTimeout ( ( ) => {
2830 this . bitstream$ . pipe ( take ( 1 ) )
2931 . subscribe ( bitstream => {
30- const bitstreamDownloadPath = getBitstreamDownloadRoute ( bitstream ) ;
32+ const bitstreamDownloadPath = this . halService . getRootHref ( ) + getBitstreamDownloadRoute ( bitstream ) ;
3133 this . hardRedirectService . redirect ( bitstreamDownloadPath ) ;
3234 } ) ;
3335 } ,
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
257257 } ) ;
258258 let bitstreamDownloadPath = getBitstreamDownloadRoute ( bitstream ) ;
259259 if ( isNotEmpty ( downloadToken ) ) {
260- bitstreamDownloadPath = bitstreamDownloadPath + '?dtoken=' + downloadToken ;
260+ bitstreamDownloadPath = this . halService . getRootHref ( ) + bitstreamDownloadPath + '?dtoken=' + downloadToken ;
261261 }
262262 this . hardRedirectService . redirect ( bitstreamDownloadPath ) ;
263263 }
You can’t perform that action at this time.
0 commit comments