-
Notifications
You must be signed in to change notification settings - Fork 478
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
Add initial support for .eln file format #9366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NicolasCARPi thanks for the pull request. Please take a look at the comments I left.
src/main/java/propertyFiles/MimeTypeDetectionByFileExtension.properties
Outdated
Show resolved
Hide resolved
This is a tiny one-line change to detect .eln files as zip files rather than unknown. I'm giving this our smallest size, which is 3. |
Co-authored-by: Philip Durbin <philipdurbin@gmail.com>
…3-eln * '9363-eln' of github.com:NicolasCARPi/dataverse: Update doc/release-notes/9363-eln.md
Hello, I have updated this PR with the now accepted IANA mime type: https://www.iana.org/assignments/media-types/application/vnd.eln+zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment about how we put files in broad buckets.
@NicolasCARPi wow, that was fast! Thanks for updating the PR. I left a new review with a comment but I'm also ok with moving this to QA for testing. Something else to think about: right now the file type detection is entirely based on the file extension. This is a good start but in the future we might as if there's a way to detect the file type by inspecting the first few bytes of the file or something. We detect a lot of files this way and only fall back on extensions if we have to. Thanks again for the PR! Congrats on your new MIME type! |
The magic number will be the same as zip (because at the end of the day it's a zip). But a 100% effective way to detect it (on top of the file extension), is to look for the presence of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. Thanks for the pull request and for responding to my feedback, @NicolasCARPi!
This should be a nice stepping stone to other ideas expressed in the linked issue.
What this PR does / why we need it:
This PR adds initial support for .eln files, which are zip archives.
Which issue(s) this PR closes:
It closes not #9363 but it gets the ball rolling. Using yoda speak here to prevent github from closing upon merge.
Special notes for your reviewer:
Given that the file is a zip, I didn't edit MimeTypeDisplay or MimeTypeFacets.
Suggestions on how to test this:
Try and upload a .eln file, as can be found here: https://github.com/TheELNConsortium/TheELNFileFormat/tree/master/examples/elabftw
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
I don't think so.
Is there a release notes update needed for this change?:
Yes.