Hi everyone,
I noticed that in Strapi v5, uploading a file during entry creation is no longer supported. Does this limitation apply only during entry creation, or does it also affect file uploads when updating an entry?
Additionally, I have the same question regarding the support for Content-Type: multipart/form-data when calling the RESTful API. Has this also been deprecated in v5?
Here is an example of the API call that works in v4 but not in v5. In v5, I always receive the following error:
ValidationError - Missing “data” payload in the request body
PUT {{baseUrl}}/articles/{{documentId}}?populate=*
Authorization: Bearer {{authToken}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="data"
{
"data": {
"name": "test",
"number": "333"
}
}
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="files.logo"; filename="00021.png"
Content-Type: image/png
< ./00021.png
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Thanks in advance!
This topic has been created from a Discord post (1288395350448803891) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord