How to add custom fields to Media / Assets

You can add via plugin or via /src/index.js in the register function. Change “customFieldName” to what ever custom field you want to create.

    strapi.contentType("plugin::upload.file").attributes.customFieldName = {
      type: "text",
    };