Task #93971
closedAdd metadata information to files when EXT:filemetadata is loaded and FilesProcessor is used
0%
Description
Situation¶
When FilesProcessor
is used in TypoScript to fetch file information, it's lacking the metadata information.
I stumbled over it because the basic information about width and height of an image is not accessible.
Solution¶
Add the metadata of all files if EXT:filemetadata is loaded in the FilesProcessor.
Updated by Oliver Bartsch over 3 years ago
- Status changed from New to Needs Feedback
Hi, just had a quick look into this.
When using the FileProcessor
, e.g.
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = image
}
I receive an array with TYPO3\CMS\Core\Resource\FileReference
objects in the view. Since they feature the getProperties
method, I'm able to access all those metadata.
{files.0.properties} // ALL
{files.0.properties.width}
{files.0.properties.height}
...
Could you please check, if this works for you?
Updated by Thomas Löffler over 3 years ago
You're completely right. Don't know why it didn't work that way as I tried several things.
Thanks anyway, you can close it.
Updated by Oliver Bartsch over 3 years ago
- Status changed from Needs Feedback to Closed
Great, thanks for the feedback. Closing this issue, as requested.