Skip to content
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

iiif: extract image dimensions (also) on publish using RecordFilesProcessorComponent #1749

Open
slint opened this issue May 21, 2024 · 1 comment
Assignees
Labels

Comments

@slint
Copy link
Member

slint commented May 21, 2024

We're currently running image dimensions (width/height) extraction via the FileProcessorComponent in invenio-records-resources. This is useful to "pre-calculate" the dimensions while the record is still a draft and just copy over the result on publish.

Given though that this code runs in an async Celery task right after the file upload, we have the following issues:

  • The task might fail
  • The task might run too late, i.e. if a user quickly uploads a file and publishes (e.g. using a REST API client), the task will try to calculate the dimensions and store them on the draft image metadata.

To avoid this, we can use the new RecordFilesProcessorComponent, which runs on publish and can make sure to send off a task for calculating the metadata on the published record's files.

@yashlamba yashlamba self-assigned this May 21, 2024
Copy link
Contributor

This issue was automatically marked as stale.

@github-actions github-actions bot added the stale label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants