-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Labels
Description
Bug Report
Describe the bug
When using the CldUploadWidget widget to sign the URL, it seems that the request it sents is not application/json. Is it possible to change this behavior?
FastAPI backend is returning a 422 response in the case it's a text/plain;charset=UTF-8 and ideally would be nice to use json
Of course, with a nodejs server; it doesn't really care about the type and transform the data into an object, but with python and Fastapi server, it's slightly different.
Is this a regression?
Nop
Steps To Reproduce the error
Create a fast API backend server with a route that takes a BaseModel to transform the payload into an object and request the route
Expected behaviour
I expect the request being a content-type application/json, here is the 422 response
{
"detail": [
{
"type": "missing",
"loc": [
"body"
],
"msg": "Field required",
"input": null,
"url": "https://errors.pydantic.dev/2.4/v/missing"
}
]
}
Your environment
- OS: Mac
- Node version: 21.1
- Npm version: 10.2.0
- Browser name and version: Chrome and Postman
Reactions are currently unavailable