Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
130 stars 86 forks source link

Preview-Icons are stored in the sys_file table #652

Open jakowidhalm opened 4 days ago

jakowidhalm commented 4 days ago

We defined PreviewIcons as SVG for our mask elements. These icons are stored in the table sys_file. Usually the should just be loaded from the file system, without any entry in the sys_file table.

By taking a look into the PreviewIconResolver.php I found out that the problem is caused by the function: $this->resourceFactory->retrieveFileOrFolderObject

There probably is some logic behind the function which automatically creates an entry in the sys_file table.

I suggest to use the function PathUtility::getPublicResourceWebPath instead

Tested on: TYPO3 12.4.22 PHP 8.3

nhovratov commented 4 days ago

Interesting, do you wanna provide a PR?