Project

General

Profile

Actions

Bug #97971

open

Using different file storages for processed files throws error if file is not processed

Added by Manfred Egger almost 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-07-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

No data to display

Actions

Also available in: Atom PDF