Problem with mime_content_type detecting wrong content type

Created on 13 April 2018, almost 7 years ago
Updated 6 April 2023, almost 2 years ago

The code in the create_taxonomy function relies on the PHP function mime_content_type() to get the content type of the imported file. However there is a known bug in this function causing some files to be detected as a text/x-fortran file (see https://stackoverflow.com/questions/16190929/detecting-a-mime-type-fails...).

To reproduce, create a CSV file with a value in the first column of one of the rows starting with "C " followed by a few more characters (the space is important). When imported, the error shown is just "Failed to open the file".

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom johnvb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024