Downgrading to v1.17.2 restores the functionality, and I'm able again to upload files.
Note that I'm using the plugin to allow attachments on the filesystem.
Attachment - Invalid file type - v1.17.3
- Edited
What kind of file are you trying to upload? Can you post an example attachment that won't upload?
Cheers.
It's a simple .zip file. like this one, with 3 small .txt files inside.
I was able to successfully upload the file you posted..did you add .zip
to your Additional File Type Filters?
Cheers.
Hi. Is it needed now? In v1.17.2 I have the "Additional File Type Filters" empty.
I've upgraded to v1.17.3 again, and the problem arises.
You will need to look at the returned response from the request to see if it includes a more detailed error.
Cheers.
Request response only says: Invalid File
No more details are available.
- Edited
Very strange that I’m unable to replicate your issue using your example.
Are you missing any PHP extensions from the Information page?
Cheers.
I'm not using a different PHP version or settings in v1.17.3, it's all the same as v1.17.2.
It's a simple upgrade of a minor version.
With v1.17.2 works fine, with v1.17.3 the problems that I've reported above.
Then I am unsure...I am unable to replicate this using the same file you are having issues with. The only thing I can think of is a server/php configuration difference.
Cheers.
I have encountered a similar issue attaching CSV files in v1.17.3 - it appears to be caused by the new "Make sure mime type is valid" check added to isValidFile in class.forms.php - FileObject::mime_type($file['tmp_name']) is returning 'application/csv' but $file['type'] returns 'text/csv' so the function returns false, causing the Invalid File error to be returned
Using Apache/2.4.52 with PHP 8.0.24
Yes, the MIME type the browser is sending does not match what PHP sees as the MIME type. Nothing you can do but remove the check for now until we find a better way to validate mime types. Removing the check will open your system to certain security vulns so I do not recommend it.
Cheers.