Skip to main content
Question

Error 400 : The request was rejected because no multipart boundary was found

  • May 22, 2025
  • 2 replies
  • 90 views

Forum|alt.badge.img

Hi

 

Getting this error when trying to upload:

 

{
   type: "http.ClientResponse",
   code: 400,
   headers: {
      "Strict-Transport-Security": "max-age=31536000",
      "Content-Length": "179",
      Date: "Mon, 19 Oct 2020 10:23:04 GMT",
      "Content-Type": "application/json; charset=UTF-8",
      Via: "1.1 mono004"
   },
   body: "{"code":"bad_request","help_url":"http://developers.box.com/docs/#errors","status":400,"message":"the request was rejected because no multipart boundary was found","type":"error"}"
}


My request

{
"method": "POST",
"url": "https://upload.box.com/api/2.0/files/content",
"headers": {
"Content-Type": "multipart/form-data",
"Authorization": "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"body": {
"attributes": {
"content_created_at": "2020-10-19T10:31:25.248Z",
"content_modified_at": "2020-10-19T10:31:25.248Z",
"name": "testphoto 00361.jpg",
"parent": {
"id": "124596773392"
}
},
"file": "TRIMMEDBASE64STRING"
}
}

Not sure what to do here.

2 replies

Forum|alt.badge.img

Furthermore, this is a server-side script, so new FormData() is not available

 


Forum|alt.badge.img

@stefan reeder: i am also getting the same error while trying to upload the file. did you got this issue resolved?