-
Notifications
You must be signed in to change notification settings - Fork 2
Property to allow composing file previews #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property to allow composing file previews #935
Conversation
WalkthroughA new configuration property, Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant MetadataBitstreamRestRepository
participant ConfigurationService
Client->>MetadataBitstreamRestRepository: Request bitstream metadata
MetadataBitstreamRestRepository->>ConfigurationService: Get create.file-preview.on-item-page-load
ConfigurationService-->>MetadataBitstreamRestRepository: Return true/false
alt create.file-preview.on-item-page-load is true
MetadataBitstreamRestRepository->>MetadataBitstreamRestRepository: Generate and store preview content
else create.file-preview.on-item-page-load is false
MetadataBitstreamRestRepository->>MetadataBitstreamRestRepository: Skip preview content generation
end
MetadataBitstreamRestRepository-->>Client: Return response
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@milanmajchrak Maybe I’ll change the message, because currently the file preview is not being generated at all — it’s not that it's generating unsuccessfully, they don't need to contact administrator. |
...ver-webapp/src/main/java/org/dspace/app/rest/repository/MetadataBitstreamRestRepository.java
Outdated
Show resolved
Hide resolved
* Enhanced file preview feature - Run file preview as authenticated user (#936), Property to allow composing file previews (#935), Do not create temp file during generating preview (#921) * Use the handle url instead of the items url with the UUID (#938) * Items file metadata not correctly updated (#940) * Remove duplicate dependency element with identical content (warnings in build) * Anonymous users should be able to use shortener * Fixed internal server error, when context.commit() was called multiple times in search request * Catch DSpaceBadRequestException rather than BadRequestException * Fixed security issue for downloading file with non anonymous license * Fixed Clarinuserregistration nullpoint exception (#941)
pulling changes from latest (lindat-2025.04.14600125143) dataquest release This contains the following changes: - UFAL/Run file preview as authenticated user (dataquest-dev#936) - Property to allow composing file previews (dataquest-dev#935) - File preview is not loaded properly for big zip file (dataquest-dev#921) - UFAL/Clarinuserregistration nullpoint exception (dataquest-dev#941) - UFAL/Use the handle url instead of the items url with the UUID (dataquest-dev#938) - UFAL/Items file metadata not correctly updated (dataquest-dev#940) - Synchronize ufal and dataquest main branches (dataquest-dev#939)
Problem description
We want to prevent users from triggering file preview generation when opening an item if a specific configuration property is not enabled. Allowing this behavior can lead to issues, especially when items contain large files—generating previews may take too long, and opening the same item multiple times could trigger concurrent preview generation processes before the first one has completed.
Summary by CodeRabbit