Image upload not working | could not parse request with message

I am new to backendless, I want to upload an image with simple js code but it gives me this error
{“code”:8002,“message”:“Could not parse request with message: Missing boundary header, status code 400, headers POST /custom-domain-app-id-place/custom-domain-api-key-place/files/?path=web//this-is-my-app-key-here/here-is-my-api-key/files/Pictures/testing-1.jpeg&overwrite=true”,“errorData”:{}}

I have been spending a lot of time but I have not found any solution. Below is the code I am using

var myHeaders = new Headers();
myHeaders.append("Content-Type", "multipart/form-data");
myHeaders.append("application-id", "my-app-id-here");
myHeaders.append("secret-key", "my-api-key-here");
myHeaders.append("application-type", "REST");

var formdata = new FormData();
formdata.append("image",  "testing-1.jpeg");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: formdata

fetch("", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Please help me, I have wasted a lot of time on this. Any little help would be highly appriciated

Is there any particular reason you are not using this API:

@mark-piller Thanks for the reply, I have used the European cluster API as well but it still gives me the same error.

Could you please share the code that uses our sdk?

well, I am not using Backendless’s SDK. I want to do it with REST API

In this case, make sure the request is formatted according to the rules mandated by the multipart/form-data content type. The error you are getting indicates the request is not properly formatted.


do you have any samples available for that? I have been reading documentation and going through all supports but still no luck

There are plenty examples on the internet. Here’s the first one that came up for me: