89519[BUGFIX] Fix file uploads where concrete MIME types can't be determined
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Georg Ringer +1
- Oliver Hader +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Georg Ringer +1
- Oliver Hader +1
- core-ci +1 CI
Issues 2
Files 7
- typo3/sysext/core/Classes/Resource/Service/ResourceConsistencyService.php+1 −19
- typo3/sysext/core/Classes/Resource/MimeTypeCompatibilityTypeGuesser.php2new+95 −0
- typo3/sysext/core/Classes/Type/File/FileInfo.php2+4 −1
- typo3/sysext/core/Configuration/DefaultConfiguration.php+73 −11
- typo3/sysext/core/Documentation/Changelog/12.4.x/Important-106735-FileMIMETypeCompatiblityMapping.rstnew+45 −0
- typo3/sysext/core/ext_localconf.php+3 −0
- typo3/sysext/install/Classes/Updates/SysFileMimeTypeMigration.phpnew+163 −0
Review log 1520
-
Benjamin Franzke uploaded patch set 1 05/26/25, 08:53
-
Benjamin Franzke uploaded patch set 2 05/26/25, 08:54
-
Benjamin Franzke uploaded patch set 3 05/26/25, 08:55
-
core-ci voted on patch set 3 V +1 05/26/25, 09:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79474
-
Benjamin Franzke uploaded patch set 4
V +105/26/25, 11:58 -
core-ci voted on patch set 4 V +1 05/26/25, 12:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79488
-
Oliver Hader commented on patch set 4 05/26/25, 13:53
-
Oliver Hader commented on patch set 4 05/26/25, 14:23
MimeTypeCompatibilityTypeGuesser.php:67I guess `+json` should be assigned to `application/json`? I have been testing with a `file.jsonld` which was determined as `application/json`, but the mime-type collection holds `application/ld+json` for that extension. Thus, code-wise having ``` } elseif (str_ends_with($mimeType, '+json')) { foreach ($extensions as $extension) { $mimeTypeCompatibility['application/json'][$extension] = $mimeType; } } elseif ( str_ends_with($mimeType, '+yaml') || (str_starts_with($mimeType, 'text/') && $mimeType !== 'text/plain') ) { ``` -
Oliver Hader commented on patch set 4 05/26/25, 14:25
The upgrade wizard worked well 👍 -
Benjamin Franzke uploaded patch set 5
V +105/26/25, 15:32 -
Benjamin Franzke commented on patch set 5 05/26/25, 15:32
MimeTypeCompatibilityTypeGuesser.php:67Replygood catch, thanks, I tested this to return text/plain (but with an older PHP version), so both options exist… I've accounted for both cases.FileInfo.php:34ReplyAck, done. -
core-ci voted on patch set 5 V -1 05/26/25, 15:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79503
-
Benjamin Franzke uploaded patch set 6
V -105/26/25, 15:39 -
Benjamin Franzke uploaded patch set 7 05/26/25, 15:40
-
core-ci voted on patch set 6 V -1 05/26/25, 15:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79505
-
core-ci voted on patch set 7 V +1 05/26/25, 15:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79506
-
Oliver Hader voted on patch set 7 CR +1 V +1 05/26/25, 18:22
-
Georg Ringer voted on patch set 7 CR +1 V +1 05/26/25, 19:02
-
Benjamin Franzke voted on patch set 7 CR +2 V +2 05/27/25, 06:10
-
Benjamin Franzke merged patch set 8 05/27/25, 06:10
FileInfo.php:34