Migrating upload plugin from v3 to media library in v4

System Information
  • Strapi Version: 3.5.4
  • Operating System: macos
  • Database: Postgres
  • Node Version: 14
  • NPM Version:
  • Yarn Version:


I’m migrating my strapi v3 to v4. we are starting with media library.

In v3 we were using custom upload.ts plugin which now a core feature of strapi, can someone please let me know what steps to follow and what are necessary changes required for the migrations?

do we need to migrate db also for media library?
what are the changes in upload.ts and plugin.ts?