MIME type of netCDF (.nc) files with direct upload
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
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
- When does this issue occur?
A user downloads a netCDF (.nc) file with direct upload active
- Which page(s) does it occurs on?
the dataset page
- What happens?
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"}}
- To whom does it occur (all users, curators, superusers)?
All the users
- What did you expect to happen?
-
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MimeTypeDetectionByFileExtension.properties and the previewer configuration, then compare direct-upload detection with the API redetect behavior for .nc and .cdf files. Determine whether the expected fix is to standardize on application/netcdf or support application/x-netcdf in previewers. Done means direct uploads and preview availability are consistent for these MIME types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100