Skip to content

use locally defined conf to map mime_types derivative methods #6238

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

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

no-reply
Copy link
Contributor

Adds Hyrax.config.derivative_mime_type_mappings to provide configuration
mapping mime_types to derivative handling behavior. This used to be triggered
based on FileSet class methods, but Hyrax has never had direct control over
FileSet (usually an ActiveFedora model).

new Valkyrie applications normally won't want to define a model class named
this. currently, they are forced to because FileSet is referenced in various
places (including here!) in the codebase. we probably don't want to ask them to
hang configuration off this, so provide a local configuration option and default
to the class defenitions for backward compatibility.

Changes proposed in this pull request:

  • Adds Hyrax.config.derivative_mime_type_mappings, which can be overridden as an alternative to redefining FileSet.image_mime_types and similar methods.

@samvera/hyrax-code-reviewers

tamsin johnson added 2 commits August 28, 2023 15:12
Adds `Hyrax.config.derivative_mime_type_mappings` to provide configuration
mapping mime_types to derivative handling behavior. This used to be triggered
based on `FileSet` class methods, but Hyrax has never had direct control over
`FileSet` (usually an ActiveFedora model).

new Valkyrie applications normally won't want to define a model class named
this. currently, they are forced to because `FileSet` is referenced in various
places (including here!) in the codebase. we probably don't want to ask them to
hang configuration off this, so provide a local configuration option and default
to the class defenitions for backward compatibility.
@no-reply no-reply added notes-minor Release Notes: Non-breaking features notes-valkyrie Release Notes: Valkyrie specific labels Aug 28, 2023
@tpendragon tpendragon merged commit 277ed58 into main Aug 29, 2023
@tpendragon tpendragon deleted the derivative_specs branch August 29, 2023 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-minor Release Notes: Non-breaking features notes-valkyrie Release Notes: Valkyrie specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants