How to add custom fields to Media / Assets

I’ve got it working like this:

In: src/index.ts

register(/*{ strapi }*/) {

    // Extend the upload plugin's file model
    const originalFileSchema = strapi.contentType('plugin::upload.file');
    
    strapi.container.get('content-types').extend('plugin::upload.file', (contentType) => ({
      ...contentType,
      attributes: {
        ...contentType.attributes,
        private: {
          type: 'boolean',
          default: false,
        },
      },
    }));
 
  },

I’m testing this still, I saw the column privatebeing created in the DB, now just need to fogure out how to set data to that field.