UK & world technology
Sign inJoin us
TechBlastTechnology. Unpacked.UK & world technology
← Latest news

From Dev.to

Let the browser set the multipart boundary for an image upload

Leave Content-Type unset in the request options when fetch() sends FormData. The browser adds the multipart boundary needed by that body. Build the form with const data = new FormData(); data.append("...

Read the full report at Dev.to ↗