Issue Task Closed

#93971Add metadata information to files when EXT:filemetadata is loaded and FilesProcessor is used

Thomas Löffler 04/22/21, 16:01 updated 04/23/21, 08:29

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Oliver Bartsch commented and changed status New Needs Feedback 04/22/21, 22:40

    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?

  2. Thomas Löffler commented 04/23/21, 08:16

    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.

  3. Oliver Bartsch commented and changed status Needs Feedback Closed 04/23/21, 08:29

    Great, thanks for the feedback. Closing this issue, as requested.