Skip to main content

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.

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


 


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


Reply