Skip to main content

Upload a file at entry creation is no longer supported

In Strapi 5, it is not possible to upload a file while creating an entry, so this should be done in 2 steps.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?Yes
🤖 Is this breaking change automatically handled by a codemod?No

Breaking change description

In Strapi v4

It was possible to upload a file while creating an entry, as documented for Strapi v4.

In Strapi 5

You must upload the file first, and then create the entry with the created file id.

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Migration procedure

Users must update their custom code, first sending a POST call to the Upload API at /api/upload/, then creating an entry with a POST call to the REST API at /api with the created file id.