Skip to content

[dspace-9_x] Fix #4734: resolve bitstream download link with UI namespace#5848

Open
hernanhlagos wants to merge 1 commit into
DSpace:dspace-9_xfrom
hernanhlagos:fix/fix-4734-contextpath-download-bitstream-dspace-9
Open

[dspace-9_x] Fix #4734: resolve bitstream download link with UI namespace#5848
hernanhlagos wants to merge 1 commit into
DSpace:dspace-9_xfrom
hernanhlagos:fix/fix-4734-contextpath-download-bitstream-dspace-9

Conversation

@hernanhlagos

@hernanhlagos hernanhlagos commented Jun 12, 2026

Copy link
Copy Markdown

References

Description

This PR fixes the bitstream download button in the item edit bitstreams page when DSpace Angular 9 is deployed under a UI namespace / context path, for example /repository.

The fix updates the download button to use [routerLink] instead of [href], matching the behavior already present in dspace-10_x.

Instructions for Reviewers

List of changes in this PR:

  • Changed the bitstream download button in item-edit-bitstream-bundle.component.html from [href]="entry.downloadUrl" to [routerLink]="entry.downloadUrl".
  • This allows Angular to resolve the download link using the configured base href / UI namespace.
  • No REST API changes are required.

This issue occurs when DSpace Angular is deployed under a UI namespace, for example:

ui:
  baseUrl: http://localhost:4000
  nameSpace: /biblioteca

rest:
  baseUrl: http://localhost:8080/repository/server

How to reproduce the issue

  1. Configure DSpace Angular with ui.nameSpace: /repository.
  2. Start DSpace Angular.
  3. Edit an item.
  4. Go to the bitstreams/files edit tab.
  5. Inspect or click the download button for a bitstream.

Before this change

The rendered link omits the configured UI namespace:

/bitstreams/<uuid>/download

This causes the browser to resolve the URL from the root of the host instead of under /repository.

After this change

The rendered link includes the configured UI namespace:

/repository/bitstreams/<uuid>/download

This matches the behavior already present in dspace-10_x.

Checklist

@lgeggleston lgeggleston changed the title Fix #4734: resolve bitstream download link with UI namespace [dspace-9_x] Fix #4734: resolve bitstream download link with UI namespace Jun 12, 2026
@lgeggleston lgeggleston added bug 1 APPROVAL pull request only requires a single approval to merge component: Item (Archived) Item display or editing labels Jun 12, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace Maintenance (10.x, 9.x, 8.x) Jun 12, 2026
@lgeggleston lgeggleston added this to the 9.4 milestone Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 APPROVAL pull request only requires a single approval to merge bug component: Item (Archived) Item display or editing

Projects

Status: 🙋 Needs Reviewers Assigned

Development

Successfully merging this pull request may close these issues.

3 participants