Restricting file upload in Media Library using specific mime types. For example , only jpeg and png files

{
    name: "strapi::body",
    config: {
      formidable: {
       filter: function ({name, originalFilename, mimetype}) {
          // keep only images
          return mimetype && mimetype.includes("image");
        }
     },
    },
  },

pretty sure you can lock it down like this, it uses formidable in the back, it’s all in the documentation, except they should probably link to the available formidable docs that have the filter options and many more things you can change.