V5 migration, problem with upload media file

System Information
  • Strapi Version: 5.0.0-rc.30
  • Operating System: windows
  • Database:better-sqlite3
  • Node Version: 10
  • NPM Version: 10.5
  • Yarn Version: 1.22.19

—for migration v4 to v5, i updated all need like
documentId for request and some .data .attributes.
but for media files
i use formdata …who i passed directement in collection profile as
(“files.avatar”, blob)

but not worked with v5, give me 400, bad request…

so i retry like doc with
formA.append(“ref”, “api::profile.profile”);
formA.append(“refId”, profId);
formA.append(“field”, ‘avatar’);*/
formA.append(“files”, blob);

or just
formA.append(“files”, blob , data.name);

give 405, not allowed
or i have allrights for…

an idea??

2 Likes

Good question, we need a complete guide about migrating plugins from 4 to 5.

Maybe you can ask for help in the Discord forum, some companies are working on migrating their plugins.

2 Likes