Send image via API to AMAZON AWS

1

I need to submit an image via jquery or javascript to an Amazon hosted API. I can send it by Postman, it shows me this code for sending:

var form = new FormData();
form.append("file", "http://www.site.com.br/2017-09-06-11-40-43.jpg");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "url API",
  "method": "POST",
  "headers": {
    "authorization": "Basic==",
    "cache-control": "no-cache"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
</script>

It returns me error 400. I tried via PHP curl and it will not too.

    
asked by anonymous 06.09.2017 / 17:30

0 answers