Problem with mime_content_type detecting wrong content type

Created on 13 April 2018, about 6 years ago
Updated 6 April 2023, about 1 year 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.69.0 2024