n8n · HTTP Request node
Unsupported media type (415) when you send a file
Short answer
This n8n HTTP Request error displays when the API expects multipart/form-data but the request body is not multipart. Set Body Content Type to Form-Data.
VerifiedLast verified
01Error text
Unsupported media type (415)02Likely causes
- Body Content Type > n8n Binary File sends the file as the whole request body, with no multipart envelope or boundary. An API that only accepts multipart uploads rejects this.
03How to fix it
- Set Body Content Type to Form-Data.
- Add a Body Parameters entry and set its Type to n8n Binary File.
- Set Name to the form field name from the API documentation.
- Set Input Data Field Name to the binary property that holds the file, such as
data.
04Official documentation
→Related errors
- Bad request - please check your parametersThis n8n HTTP Request error displays when the node receives a 400 error indicating a bad request. Review the API documentation for your service to format your query parameters.
- The resource you are requesting could not be foundThis n8n HTTP Request error displays when the endpoint URL you entered is invalid. Refer to your service's API documentation to verify you have a valid endpoint.
- Connection refused (ECONNREFUSED)ECONNREFUSED in the n8n HTTP Request node means the node reached a host but the target port has no listener, most often because of Docker networking on self-hosted n8n. Address the target by a name the container can route to, such as host.docker.internal or the Compose service name.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for n8n work:Open n8n jobsn8n rates and salaries