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:
- Deploy DSpace Angular with a custom context path, e.g.
http://localhost:4000/repository or http://localhost:4000/repository/items/[item_id]/edit/bitstreams.
- As an administrator, edit an Item and go to the Edit Item screen.
- Select the Files tab.
- Click the download icon in the Actions column (BUNDLE: ORIGINAL, TEXT, THUMBNAIL, LICENSE) (see screenshot).
- Observe the URL of the download request.
Expected behavior
The generated download URLs should include the configured context path.
Related work
No ticket or PR related.