#97971Using different file storages for processed files throws error if file is not processed
Description
We have the following scenario: we have two file storages and the main file storage is configured to store the processed files in the second file storage. If we now do sime image processing the processed files are stored in the second file storage. But if the processing instructions result in not doing anything with the original file, the processed file identifier points to the original file but the storage points to the second one. If we then want to access properties like mime_type, an error is thrown, that the file doesn’t exists
Steps to reproduce:- create a second file storage
- set processingfolder of main file storage (fileadmin) to the second file storage (e.g. 2:/processed)
- do some image processing on a file in main file storage and access properties like mime_type of the processed file
page = PAGE
page.10 = IMG_RESOURCE
page.10 {
file = fileadmin/user_upload/test.png
file {
maxW = 100
}
stdWrap.postUserFunc = Any\Extension\UserFunc->postUserFunc
}
In the extension UserFunc class:
namespace Any\Extension;
class UserFunc {
public function postUserFunc() {
return $GLOBALS['TSFE']->lastImgResourceInfo['processedFile']->getMimeType();
}
}
If page.10.file.maxW is set to a value greater than the width of the original image an error is thrown instead of showing the mime type. This also applies to some other properties.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 2
-
Benni Mack changed Related to #102267 <span data-processor="relativetime" data-value="2026-11-13T12:42:10+00:00" > 11/13/26, 12:42 </span>
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-13T12:42:25+00:00" > 11/13/26, 12:42 </span>
Fixed by b5e7165487f, “[BUGFIX] Use original file for ProcessedFile::getMimeType and ::getSize” (Resolves #102267, merged for main and 12.4, Gerrit 81593).