Predefined Asset Metadata

Hello,

I just start to work with Pimcore.
I need on an asset an additional information, in which the type of the assets is stored. In addition there is a list of given types from which must be selected.

I imagined that I can realise this requirement with predefined asset metadata. But I find no information about predefined asset metadata in the documentation of Pimcore 5.

Are predefined asset metadata the right method of resolution?
How can I define predefined asset metadata to which I can give a list of default values?

Kind regards,
K. Budde

Hello, I have a slightly different question.
Is it possible to automatically assign the predefined Asset metadata to new assets without clicking on the “Add predefined definitions” button, so that they are transferred directly after the upload?

best regards

Hi there,

In both of your cases it should be possible to solve the problem with EventListeners/EventSubscribers.
Have a look here: AssetEvents

You could listen to the postAdd Event and then set your Metadata you need. The type of the asset can also be resolved from the AssetEvent object.

Maybe there’s a nice way but this should work.

Regards

1 Like

same problem/question here.
Link to AssetEvents is broken.
Where can I find information about how to define and use predefined asset metadata?

Fixed the link from @scrummer’s post - Please try again @hbarkmann!