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

Passthrough the configured MIME. #175

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

jordandukart
Copy link
Member

What does this Pull Request do?

Allows a configured MIME type from an Islandora action to be passed through to Hypercube.

What's new?

The MIME type of text/plain is no longer hardcoded and a configured MIME type is now used.

How should this be tested?

Create an action that uses Hypercube (OCR, hOCR) and specify a MIME type that isn't text/plain.

Ingest an object and media that will create a derivative with Hypercube to be triggered (for example a book, pages and media).

The resultant File entities within Drupal have the set MIME type that matches the one configured.

Interested parties

@Islandora/8-x-committers

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c2c44b9) 76.72% compared to head (8048e5a) 76.72%.

Additional details and impacted files
@@            Coverage Diff            @@
##                4.x     #175   +/-   ##
=========================================
  Coverage     76.72%   76.72%           
  Complexity      160      160           
=========================================
  Files             6        6           
  Lines           782      782           
=========================================
  Hits            600      600           
  Misses          182      182           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@whikloj whikloj left a comment

Choose a reason for hiding this comment

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

I don't have a box standing to actually run this, but I can't see any issue here.

HeaderBag::get
Returns the first header by name or the default one.
Returns: null|string 

If I can get around to building a new box I'll try to fully test it, but otherwise I might be able to just standup Hypercube and curl at it.

@seth-shaw-asu seth-shaw-asu self-requested a review June 21, 2023 17:23
@seth-shaw-asu
Copy link
Member

So, this works as described. The only hesitation I have is that the Media entity is still showing text/plain instead of the new mime type on the file.

@seth-shaw-asu
Copy link
Member

Although I suppose that is a Drupal issue; not a Crayfish one...

@seth-shaw-asu seth-shaw-asu merged commit fd2b04c into Islandora:4.x Jul 19, 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