Skip to content

UFAL/Successfully downloaded collection file when the file is downloading#1231

Merged
milanmajchrak merged 3 commits intodtq-devfrom
ufal/successfully-downloaded-collection-file-when-the-file-is-downloading
Mar 4, 2026
Merged

UFAL/Successfully downloaded collection file when the file is downloading#1231
milanmajchrak merged 3 commits intodtq-devfrom
ufal/successfully-downloaded-collection-file-when-the-file-is-downloading

Conversation

@Paurikova2
Copy link
Collaborator

@Paurikova2 Paurikova2 commented Mar 4, 2026

Problem description

When you are authorized, there is error 404: Not Found.
image

Now:
image

Copilot review

  • Requested review from Copilot

@Paurikova2
Copy link
Collaborator Author

@milanmajchrak should I add it to test scenario?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a 404 error that authenticated users experienced when downloading a bitstream. The root cause was that the BitstreamPageResolver was allowing findById to reuse a cached response (potentially a 404 obtained during SSR when the user was not yet authenticated), instead of re-fetching with the authenticated user's credentials on the client side.

Changes:

  • useCachedVersionIfAvailable flipped from truefalse so the resolver always fires a fresh request.
  • reRequestOnStale simultaneously corrected from falsetrue to restore the expected default stale-re-request behaviour.

@Paurikova2
Copy link
Collaborator Author

@milanmajchrak please can you also test it during the review?

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@milanmajchrak
Copy link
Collaborator

@milanmajchrak please can you also test it during the review?

On dev machine

@milanmajchrak
Copy link
Collaborator

@Paurikova2 have you checked this is also and error in the Vanilla?
If not check in the issues if there haven't solved it.

@Paurikova2
Copy link
Collaborator Author

@milanmajchrak
I checked it, but in version 9 the downloading works differently. That error is not there anymore. However, I checked the related classes in dspace-angular, and the code is completely different compared to version 7. And there is no demo for version 7.

@milanmajchrak
Copy link
Collaborator

@Paurikova2 I'm going to merge it. Please test it on our dev machine.

@milanmajchrak milanmajchrak merged commit 6e743aa into dtq-dev Mar 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UFAL/When downloading the file the collection license is not sucessfully downloaded

3 participants