How to make custom media fields?

I would like to add extra fields to the media files (video, images, etc), how can this be done? For example author, license, copyright, etc. fields.

1 Like

I think you can extend the File.settings.json at least that’s what you could do in V3 :slight_smile:

Could you show an example on how that would look like? Didn’t find anything in this thread.

Anyone have a solution for this yet?

In V4 I see that the schemas are defined as js files instead of json. See strapi/packages/core/upload/server/content-types at main · strapi/strapi · GitHub.
The JSON override seems to have no effect, nor seems possible to override those JS files.

I use a TypeScript template and the only override I am able to do is with the “imperative API”, i.e. put a src/extensions/upload/strapi-server.ts with

export default (plugin) => {
  const file = plugin.contentTypes["file"];
  // ...customize file
  // then plugin.contentTypes["file"] = file
  return plugin;
};

I really don’t like this approach. I wish I could modify the schemas

1 Like