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

CharacterizationService: teach #file_name about Valkyrie objects #383

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dunn
Copy link
Contributor

@dunn dunn commented Dec 3, 2021

No description provided.

@dunn
Copy link
Contributor Author

dunn commented Dec 3, 2021

else
object.original_name.nil? ? "original_file" : object.original_name
end
when Hyrax::FileMetadata
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the short term, would it be helpful to (also?) add an alias #original_name to Hyrax::FileMetadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could; i guess in that case maybe we'd want to flip the branch order and check for object#original_name first, then fall back on source

the problem is that the object we provide as source errors on both branches of source.is_a?(File) ? File.basename(source.path) : File.basename(source) so that codepath is only appropriate when it's Hydra::PCDM::File

(i guess a further question is why it's preferred over the #original_name in the first place?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

5 participants