Closed nicolasbrossard closed 1 month ago
Hi Nicolas,
Do you remember if you actually uploaded a compressed file, or if you uploaded a different type and renamed it to .zip
?
I tried uploading a zip file and got:
However, when I renamed a png to be .zip
, I got:
I noticed that the imaging_uploader does not check for the file including the string .zip
, it instead checks the actual filetype using mime_content_type
If you can confirm that you just renamed a non-compressed file to .zip, then I believe this is not an issue.
Also, based on the isCompressed documentation, it does not work for zip-based compression. Maybe we should check if this is happening for other file types like .tar.gz
@skarya22 I see what you mean. I did rename a random file to .zip, which would explain why I got two error messages displayed in the popup (one for the mismatch in pscid/candid and the other for the invalid file format). This issue can be closed then.
@AlexandraLivadas I believe that the "type" for .tar.gz and others also includes the term "zip" such as application/gzip, so I don't think there should be an issue - but worth testing anyway!
Ok I tested and its working for everything. I think we are good to close.
I tried uploading a scan for a non-existent PSCID and got this error message:
My file was a .zip so the second sentence should not be there. I feel like the
... is not of type .tgz, .tar.gz or .zip
sentence is always appended to the real error message.