Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docker/docker-compose-rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,16 @@ services:
- /bin/bash
- '-c'
# When customizing the namespace, add the following command to the entrypoint command below (after `while ...`):
# `pushd ../webapps && unlink server && ln -s /dspace/webapps/server/ 'repository#server' && popd`
# `pushd ../webapps && (unlink server || true) && (ln -s /dspace/webapps/server/ 'repository#server' || true) &&
# popd`
# The `(... || true)` condition is necessary to ensure the `popd` command runs at the end.
# It used to fail when the `server` folder did not exist in `/webapps`.
# This will create a symlink from the webapps directory to the server directory with the custom namespace
# (e.g. /dspace/webapps/server -> /dspace/webapps/repository#server)
- |
while (!</dev/tcp/dspacedb/543${INSTANCE}) > /dev/null 2>&1; do sleep 1; done;
/dspace/bin/dspace database migrate force
custom_run.sh
./custom_run.sh
/dspace/bin/start-handle-server
# DSpace database container
dspacedb:
Expand Down Expand Up @@ -168,6 +171,7 @@ services:
cp -r -u /opt/solr/server/solr/configsets/dspace/statistics/* statistics
exec solr -p 898${INSTANCE} -f -m 4g
volumes:
# Commented out because there are a lot of files in the assetstore
assetstore:
pgdata:
solr_data:
Expand Down
5 changes: 5 additions & 0 deletions src/app/app-routing-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function getBitstreamModuleRoute() {
export function getBitstreamDownloadRoute(bitstream): string {
return new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'download').toString();
}

export function getBitstreamContentRoute(bitstream): string {
return new URLCombiner(getBitstreamModuleRoute(), bitstream.uuid, 'content').toString();
}

export function getBitstreamRequestACopyRoute(item, bitstream): { routerLink: string, queryParams: any } {
const url = new URLCombiner(getItemModuleRoute(), item.uuid, 'request-a-copy').toString();
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { RemoteDataBuildService } from '../../core/cache/builders/remote-data-bu
import { HttpOptions } from '../../core/dspace-rest/dspace-rest.service';
import { Router } from '@angular/router';
import { getItemPageRoute } from '../../item-page/item-page-routing-paths';
import { getBitstreamDownloadRoute } from '../../app-routing-paths';
import { getBitstreamContentRoute } from '../../app-routing-paths';
import { hasFailed } from 'src/app/core/data/request-entry-state.model';
import { FindListOptions } from '../../core/data/find-list-options.model';
import isEqual from 'lodash/isEqual';
Expand Down Expand Up @@ -255,10 +255,12 @@ export class ClarinLicenseAgreementPageComponent implements OnInit {
.subscribe(bitstream$ => {
bitstream = bitstream$;
});
let bitstreamDownloadPath = getBitstreamDownloadRoute(bitstream);
let bitstreamDownloadPath = getBitstreamContentRoute(bitstream);
if (isNotEmpty(downloadToken)) {
bitstreamDownloadPath = bitstreamDownloadPath + '?dtoken=' + downloadToken;
bitstreamDownloadPath = this.halService.getRootHref() + '/core' + bitstreamDownloadPath +
'?dtoken=' + downloadToken;
}

this.hardRedirectService.redirect(bitstreamDownloadPath);
}

Expand Down