title: How to download an image as stream then upload it?
body: <p>I have a lot of images on my website and want to migrate the images to a new hosting. then I made a script to scrape it using xray. once I got the url I want to download the file without writing it to hardisk and then directly upload it to my new hosting. 
  I am using Strapi and "strapi-provider-upload-wasabi" to upload my image. with my code I always getting <code>400 Bad request</code></p>
  
  <pre><code>request.get(url, function (error, response, body) {
      if (!error &amp;&amp; response.statusCode == 200) {
          data = "data:" + response.headers["content-type"] + ";base64," + new Buffer(body).toString('base64');
  
          var form = {
              "refId": body.id,
              "ref": "comic",
              "field": "cover",
              "files": data,
              "path": "/"
          }
  
          request({
              uri: 'http://localhost:1337/upload',
              method: 'POST',
              headers: {
                  'Content-Type': 'multipart/form-data'
              },
              formData: form
          }, function optionalCallback(err, httpResponse, body) {
  
              if (err) {
                  return console.error('upload failed:', err);
              }
              // console.log(httpResponse);
              console.log('Upload successful!  Server responded with:', httpResponse.statusMessage);
          });
      }
  });
  </code></pre>