diff --git a/typo3/sysext/core/Classes/Resource/File.php b/typo3/sysext/core/Classes/Resource/File.php index 114b0d7217cf99c7b21843c2743669b652645462..ab5b6b0678ba893fb639e49a20eef6ae4abf0f54 100644 --- a/typo3/sysext/core/Classes/Resource/File.php +++ b/typo3/sysext/core/Classes/Resource/File.php @@ -244,7 +244,12 @@ class File extends AbstractFile { $this->properties[$key] = $value; } } - + // If the mime_type property should be updated and it was changed also update the type. + if (array_key_exists('mime_type', $properties) && in_array('mime_type', $this->updatedProperties)) { + $this->updatedProperties[] = 'type'; + unset($this->properties['type']); + $this->getType(); + } if (array_key_exists('storage', $properties) && in_array('storage', $this->updatedProperties)) { $this->storage = ResourceFactory::getInstance()->getStorageObject($properties['storage']); }