HTTP 415 Unsupported Media Type When Submitting a Form
The server rejects the correct data form with status 415 before moving to validation of content. Endpoint expects a different Content-Type than declared by the client, e.g. JSON vs multipart/form-data.
How to determine the source of the error
Check Content-Type header and actual payload format in Network.
Compare the type declared by API with the parser used on the server side.
What to do step by step
1. For JSON set application/json and send the actual JSON.stringify object. Separate normal fields from files; most libraries serialize FormData differently than JSON objects.
2 . For FormData, do not manually set the partitions; let the browser create the correct multipart header.
How to check the score
The server correctly parses both of the specified formats or clearly rejects the unsupported type.
What to do
Do not set Content-Type: application/json for the raw FormData object.