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

When MIME type is image/tif the file gets a .bin extension with CRUD #95

Open
dara2 opened this issue Sep 13, 2023 · 1 comment
Open

Comments

@dara2
Copy link

dara2 commented Sep 13, 2023

I am finding that when I use the following command on an i7 site to batch OBJs for a group of objects, files that have ".tif" as the extension and MIME type image/tif are getting batched as .bin files that do not open. If I simply rename the file to have a .tiff extension, it opens fine. Is there a setting somewhere to which I can add "tif" as an acceptable extension for OBJ files?

Command I'm using:

drush islandora_datastream_crud_fetch_datastreams -u 1 --pid_file=pid_list.txt --dsid=OBJ --datastreams_directory=/islandora/exports/batch4

Here's what the file looks like in i7 manage datastreams tab:
Screenshot 2023-09-13 at 12 26 12 PM

@bradspry
Copy link

bradspry commented Jun 7, 2024

This tool is dependent on Drupal's mime-types definitions, located at:
/$your_drupal_path/includes/file.mimetypes.inc

Inside the file you will see mime-types with their associated file extensions.

I had the same issue with WAV files exporting as .bin. Inside of file.mimetypes.inc, I found WAV listed under "audio/x-wav". I updated the definition to Islandora's "audio/vnd.wave" which already used the proper WAV file extension. Clearing Drupal's cache will refresh the definitions and from then forward, files will export with their proper file extensions.

However, be cogent when updating Drupal because file.mimetypes.inc often gets updated and your change will regress.

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

No branches or pull requests

2 participants