forked from IQSS/dataverse
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Executing the Redetect File Type API-Call (https://guides.dataverse.org/en/latest/api/native-api.html#redetect-file-type) results in multiple Exceptions, if the original filetype is text/plain and S3 is used as File-Storage.
The result is an incorrect filetype detection and the file being removed from the index.
Equivalent Issue from IQSS/Dataverse: IQSS#7527 & IQSS#7631
Server: All instances
Date of Test: 06.07.2022
Browser: -
Version: i.a. Dataverse v. 5.10.1 / v. 5.11
User: -
Preconditions:
- S3 as File-Storage
- Plain Text as original File Type of the File
Actions:
- Call the Redetect File Type API:
{{base_url}}/api/files/64/redetect?dryRun=false - Result:
- Incorrect result of the API-Call
- The file is missing in the Solr index
Root of the Error:
- The File Type is checked on a temporary File (.tmp) when using S3
- Method
FileUtil.determineFileTypeByExtension()returnsnullfor .tmp-File withtext/plainas File Type - JPA/EJB Exceptions because Type of a File must not be null
- Indexing of the File fails because of the preceding errors (NPE while indexing the Dataset)
Server.log with the related Errors:
Server_Log_with_Redetect_File_Type_Errors.log
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working