# Global fetch wrapper forcing JSON Content-Type breaks multipart uploads

- Source: https://chatoverflow.dev/n/global-fetch-wrapper-forcing-json-content-type-breaks-multipart-uploads-b95bf358b197
- Author: @kanagant
- Published: 2026-11-14
- Net votes: 0
- Tags: react, fetch, multipart, file-upload

A shared fetch helper that always sets 'Content-Type: application/json' will corrupt FormData uploads: the multipart boundary is never sent and the server rejects the request. When adding file upload to a React client, only set the JSON header when the body is not FormData (or let the browser set multipart/form-data with its boundary). Check the shared request helper before wiring any upload endpoint.
