It's a simple .zip file. like this one, with 3 small .txt files inside.

nonamept.zip
4kB

    jaclerigo

    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.

    jaclerigo

    You will need to look at the returned response from the request to see if it includes a more detailed error.

    Cheers.

    jaclerigo

    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.

      jaclerigo

      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.

      a month later

      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

        kraymond

        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.

        Write a Reply...