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

Allowing Image fields for multi-file media #860

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

dannylamb
Copy link

GitHub Issue: Islandora/documentation#2003

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

Adds image field support for multi-file media

What's new?

Let's you name an image field as the 'destination field' for multi-file media. Basically just adds some extra options in the buildConfigurationForm() function of AbstractGenerateDerivativeMediaFile class.

How should this be tested?

You have to set up media type for multifile media. But a good check that doesn't involve the full setup is to go to Admin > Config > System > Actions and create a new 'Generate a Derivative File for Media Attachment' action. You should see image fields in the dropdown for 'Destination Field Name':

image

Documentation Status

I don't think this stuff is really documented at all? If it were I'd at least mention that you can do image fields now. If it is documented, point me to it and i'll add a PR for that too.

Interested parties

@Islandora/8-x-committers

@dannylamb
Copy link
Author

Github actions can't set up a mysql connection? Feels pretty orthogonal to what I've got going on here.

@kstapelfeldt
Copy link
Member

From tech call: Is altext from images being propagated correctly? Map and file variables are being reused - do you see any issues with that? (tech call had some questions about best practice here)

@rosiel
Copy link
Member

rosiel commented Jul 24, 2022

Setting the alt text to something meaningless like '4.jpg' is bad and we shouldn't do it.

If an image is being used as "decoration as part of a link" - i.e. the usual uses of a thumbnail image - then it's best practice to leave the alt text empty.

No-one has expressed concerns with the duplication of variables over the last 6 months, and I've tested and this works.

Thank you Danny for adding this!

@rosiel rosiel merged commit a297796 into 2.x Jul 24, 2022
@rosiel rosiel deleted the multi-file-media-image-fields branch July 24, 2022 18:52
rosiel added a commit to rosiel/islandora that referenced this pull request Jul 26, 2022
rosiel added a commit to rosiel/islandora that referenced this pull request Nov 24, 2022
rosiel pushed a commit to rosiel/islandora that referenced this pull request Dec 14, 2022
rosiel added a commit to rosiel/islandora that referenced this pull request Dec 14, 2022
rosiel added a commit to rosiel/islandora that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants