But usually, the server expects the API request to be multipart/form but in this case, the request is handled as application/json.
Is there a way to override this behavior? The official react-admin docs only cover the base^4 handling. I cant seem to figure out to change the call to multipart form data.
How do we handle file upload?
React admin
<FileInput />
or<ImageInput />
returns an object containing the blob of the file like below:But usually, the server expects the API request to be
multipart/form
but in this case, the request is handled asapplication/json
.Is there a way to override this behavior? The official react-admin docs only cover the base^4 handling. I cant seem to figure out to change the call to multipart form data.
Adding my code below.
Issues inside react-admin are not helpful either.