Skip to content

Bitstream download route fails when DSpace is deployed under a custom context path #4734

@hernanhlagos

Description

@hernanhlagos

Describe the bug

When DSpace Angular is deployed under a custom context path (e.g. /repository), the generated bitstream download URLs are incorrect.

Instead of including the context path, the links are built as if DSpace was mounted at root /. This results in broken download links (404 Not Found).

Version(s): DSpace Angular 7.x, 9.x (tested on 7.4, 9.1, likely affects other versions)
Browser: Tested on Chrome 140, Edge 140 (same behavior)


To Reproduce

Steps to reproduce the behavior:

  1. Deploy DSpace Angular with a custom context path, e.g. http://localhost:4000/repository or http://localhost:4000/repository/items/[item_id]/edit/bitstreams.
  2. As an administrator, edit an Item and go to the Edit Item screen.
  3. Select the Files tab.
  4. Click the download icon in the Actions column (BUNDLE: ORIGINAL, TEXT, THUMBNAIL, LICENSE) (see screenshot).
  5. Observe the URL of the download request.

Image
Image

Expected behavior

The generated download URLs should include the configured context path.

Related work

No ticket or PR related.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions