I seem to be getting a 500 error if I simply add the content-type header “multipart-data”. error looks like this: bad content-type header, no multipart boundary
Fascinating! Do you have any idea where I could’ve gone wrong? This is the request:
let formData = new FormData()
formData.append('files', uploadedFile);
console.log(uploadedFile) //check image below
for (var pair of formData.entries()) {
console.log(pair[0]+ ', ' + pair[1]); //check image below
}
axios({
method: 'post',
url: baseUrl + 'upload',
data: formData,
headers: {} // with or without 'Content-Type': 'multipart/form-data' I can't seem to get a 200 response
})
Btw, you can open that sandbox and try to upload a file.
If your strapi localhost is running on 1337 on the same PC, the browser will make a request to your local strapi instance since the requests from this sandbox are client-side.