Populate CreatedBy for Media's

Hello,

I saw that in Database that the information about which user uploaded / updated an image to the Media’s Library is saved.

I would like to find a way to populate that to my request’s response, how’s that do-able ?

For my precise case, I have document and documents are linked to multiple files, I can currently get the file by simply doing such a call : /api/documents?populate=files, but I would like within the same response to fetch the users who created those files.

Kind regards :slight_smile:

This topic has been created from a Discord post (1278052686305956022) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

You can do that by setting the populateCreatorFields option to true in the schema of the content type.

Though seeing as the media’s are a native content type, you can’t easily edit it’s schema.

You’ll probably have to do some funky stuff in the register function of your app to alter the schema.