Project

General

Profile

Actions

Task #93971

closed

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

Added by Thomas Löffler over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-04-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Sprint Focus:

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.

Actions #1

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?

Actions #2

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.

Actions #3

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.

Actions

Also available in: Atom PDF