Skip to content

Comments

Issue 1313: fixed error when file preview is not generated for bitstream with store_number = 77#1318

Merged
kosarko merged 2 commits intoclarin-v7from
issue_#1313_file_preview_with_sync_storage
Jan 29, 2026
Merged

Issue 1313: fixed error when file preview is not generated for bitstream with store_number = 77#1318
kosarko merged 2 commits intoclarin-v7from
issue_#1313_file_preview_with_sync_storage

Conversation

@kuchtiak-ufal
Copy link

No description provided.

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 an error that occurred when file previews were not generated for bitstreams with store_number = 77 (the synchronized storage service identifier). The fix adds support for retrieving files from synchronized storage when generating file previews.

Changes:

  • Added a new retrieveFile() method override in SyncBitstreamStorageServiceImpl to properly handle file retrieval for synchronized bitstreams
  • Created a new integration test testPreviewWithSyncStorage() to verify preview generation works with synchronized storage
  • Added a test helper method withBitstream() in WorkspaceItemBuilder to create bitstreams with specific store numbers for testing

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
dspace-api/src/test/resources/org/dspace/scripts/filepreview/logos.tgz Test resource file (binary compressed archive) for sync storage test
dspace-api/src/test/java/org/dspace/scripts/filepreview/FilePreviewIT.java Added new test for preview generation with sync storage and refactored existing test
dspace-api/src/test/java/org/dspace/builder/WorkspaceItemBuilder.java Added builder method to create bitstreams with specific store numbers
dspace-api/src/main/java/org/dspace/storage/bitstore/SyncBitstreamStorageServiceImpl.java Added retrieveFile() method and removed SQLException from retrieve() signature

@kosarko kosarko merged commit 04d64f7 into clarin-v7 Jan 29, 2026
10 checks passed
@port-pr
Copy link

port-pr bot commented Jan 29, 2026

Backport branch created but failed to create PR.
Request to create PR rejected with status 403.

Please create the PR manually:

Or via GitHub CLI:

gh pr create --repo dataquest-dev/dspace --base dtq-dev --head ufal:backport-1318-to-dtq-dev --title "[Port dtq-dev] Issue 1313: fixed error when file preview is not generated for bitstream with store_number = 77" --body "Port of #1318 by @kuchtiak-ufal to `dtq-dev`."

(see action log for full error response)

port-pr bot pushed a commit that referenced this pull request Jan 29, 2026
…eam with store_number = 77 (#1318)

* Issue #1313: fixed error when file preview is not generated for bitstream with store number = 77

* resolve MR comments

(cherry picked from commit 04d64f7)
@kuchtiak-ufal kuchtiak-ufal deleted the issue_#1313_file_preview_with_sync_storage branch February 16, 2026 09:31
milanmajchrak pushed a commit to dataquest-dev/DSpace that referenced this pull request Feb 19, 2026
…itstream with store_number = 77 (ufal#1318) (#1240)

* Issue ufal#1313: fixed error when file preview is not generated for bitstream with store number = 77

* resolve MR comments

(cherry picked from commit 04d64f7)

Co-authored-by: Milan Kuchtiak <kuchtiak@ufal.mff.cuni.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File Preview doesn't work when sync.storage.service.enabled is set to true

2 participants