-
Notifications
You must be signed in to change notification settings - Fork 71
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
Allow multiple Media Use selections on file media #1142
Comments
I've got a working OCR module now to hook up to the Hypercube microservice. I want all the image stuff that takes place with an original file, but also want to mark the input as an OCR candidate. If we switch Media Use to allow multiples from a radio select we can pick and choose what sorts of behaviors we want for any given file object. |
I like this idea. Even though for images we may want a distinct "Original File" and "Service File" (primary access version) there are instances where we want to use an "Original File" as the access copy (e.g. a PDF original that works fine for access). Juggling the display modes between the two can be problematic, but if we simply allow a Media to be both an "Original File" AND a "Service File" I won't have to worry about incorporating "Original File" fall-backs in the absence of a "Service File." Currently, you can configure your Islandora site to do this before any Media are created. But I think this is a sensible default. |
As far as the code is concerned, there may be a handful of spots where I'm making the assumption that you have one media_use. Like i'm just pulling the first instead of iterating over the list of one. We also could consider amending the REST API to account for this. Right now, when you PUT a media to a node, you have to provide a media_use term id as a route param. We could let that be multiple with Drupal's Either way, I think the fallout from a change like this is pretty minor, and it makes sense that a file may serve two purposes. |
I tested this out. Simply changing After adjusting the cardinality I created an image repository item and only selected 'Original File' for the media_use and derivatives still worked as expected. Then I added another image and selected both 'Original File' and 'Service File'. This time only the thumbnail was generated as one would expect. All the views and display modes are working as I would expect. I'm in favor of this being the new default. |
Can haz PR? |
@dannylamb, sure. Just let me test the change on a site with existing content to see if we need an update hook for this. |
Sweet, it worked without any update hook shenanigan!. |
As soon as my next environment spins up, I'll test this. |
PRs merged. |
No description provided.
The text was updated successfully, but these errors were encountered: