-
Notifications
You must be signed in to change notification settings - Fork 507
File Recognition - Add support for files without extensions #8744
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
File Recognition - Add support for files without extensions #8744
Conversation
d984634
to
10d10a1
Compare
9f7ddc5
to
6afd466
Compare
497bdf7
to
575e3b5
Compare
@adaybujeda can you please resolve the merge conflicts in this branch? |
31f8ed0
to
734f467
Compare
@pdurbin conflicts resolved - ready to go! |
@adaybujeda thanks. A couple things. FilesIT.testAddTinyFile is failing. Here's a screenshot from Jenkins: Is this expected? Dataverse can no longer figure out that a text file called "1char" is of type text/plain? Should we get this working again? Less important (no need for you to fix this) but worth mentioning, in Netbeans I'm having a strange problem where I can't use "Test File" or "Run Focused Test Method" in FileUtilTest.java. However, this works fine in Intellij. This isn't specific to your changes at all. It seems like this is happening because the tests are within subclasses. |
Looking into the |
5cef645
to
5d1ae86
Compare
The problem was that the type recognized by I updated to only override the file type when Dataverse has a content type for the file name. The failing test is now working locally. |
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.
Looks good. Thanks, @adaybujeda! I did make some small tweaks to the docs. Off to QA.
Thanks @pdurbin!! 🚀 |
@kcondon as of 017137d the "Maven Unit Tests" job is marked as failed but it looks like it's because the Coveralls API was down. The Jenkins tests ran fine (which included unit tests), including the API tests: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-8744/12/testReport/ |
What this PR does / why we need it:
Use the full filename to determine the file type when the file do not have an extension.
Which issue(s) this PR closes:
Special notes for your reviewer:
Supported files in this PR are
Makefile
andSnakemake
Suggestions on how to test this:
Upload a file without extension as the ones suggested above.
Files with extension work as before.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
No
Additional documentation:
No