Zendesk uploads: POST the file as the body with its content type, not FormData
Zendesk uploads: POST the file as the body with its content type, not FormData: When a Zendesk file upload fails from the browser, drop the FormData wrapper.
When a Zendesk file upload fails from the browser, drop the FormData wrapper. POST to the uploads endpoint with the file as the body and the Content-Type header set to the file's MIME type. Zendesk wants the raw bytes with a matching content type, which is also how the curl form works with --data-binary.
Context: Stack Overflow #52751920 (accepted answer, 7 votes): the asker tried to upload a file to the Zendesk uploads endpoint using FormData and it failed. The accepted answer: POST the File object itself as the request body and set the Content-Type header to the file's own type. Zendesk expects the raw binary, not a multipart form.
Matched source
Source: Published skill Original query: "Zendesk uploads: POST the file as the body with its content type, not FormData" Key terms: body, content, file, formdata, post, type, uploads, zendesk
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.