MIME type of netCDF (.nc) files with direct upload #9884
Labels
Feature: File Upload & Handling
Type: Bug
a defect
User Role: Depositor
Creates datasets, uploads data, etc.
entrepot.recherche.data.gouv.fr
What steps does it take to reproduce the issue?
Have direct upload enabled
Have a netCDF file with a .nc file extension
A user downloads a netCDF (.nc) file with direct upload active
the dataset page
Having this configuration in the MimeTypeDetectionByFileExtension.properties file:
nc=application/netcdf
I expect to get this MimeType in BDD when adding a .nc file to my dataverse.
This is not the case :)
I get the MimeType "application/x-netcdf" and I can't see the previewer for this file because it is configured for the MimeType "application/netcdf"
Note that when I apply a redetect with the API, the result is OK:
{"status":"OK","data":{"dryRun":true,"oldContentType":"application/x-netcdf","newContentType":"application/netcdf"}}
All the users
For Java and Apache, the MimeType for .nc and .cdf files appears to be "application/x-netcdf".
Perhaps we need to adapt MimeTypeDetectionByFileExtension.properties and the previewers in order to maintain consistency?
Add "application/x-netcdf" to previewers to enable it for this MimeType
Which version of Dataverse are you using?
5.14
Any related open or closed issues to this bug report?
The text was updated successfully, but these errors were encountered: