title: Can't upload image to S3 bucket using direct url of image
body: <p>Here is my code, which works for forms upload (via $_FILES) (I'm omitting that part of the code because it is irrelevant):</p>
  
  <pre><code>$file = "http://i.imgur.com/QLQjDpT.jpg";
  
  $s3 = S3Client::factory(array(
      'region' =&gt; $region,
      'version' =&gt; $version
  ));  
  
          try {
  
              $content_type = "image/" . $ext;
  
              $to_send = array();
  
              $to_send["SourceFile"] = $file;
  
              $to_send["Bucket"] = $bucket;
              $to_send["Key"] = $file_path;
              $to_send["ACL"] = 'public-read';
              $to_send["ContentType"] = $content_type;
  
              // Upload a file.
              $result = $s3-&gt;putObject($to_send);
  </code></pre>
  
  <p>As I said, this works if file is a <code>$_FILES["files"]["tmp_name"]</code> but fails if $file is a valid image url with Uncaught exception 'Aws\Exception\CouldNotCreateChecksumException' with message <code>'A sha256 checksum could not be calculated for the provided upload body, because it was not seekable. To prevent this error you can either 1) include the ContentMD5 or ContentSHA256 parameters with your request, 2) use a seekable stream for the body, or 3) wrap the non-seekable stream in a GuzzleHttp\Psr7\CachingStream object. You should be careful though and remember that the CachingStream utilizes PHP temp streams. This means that the stream will be temporarily stored on the local disk.'</code>. Does anyone know why this happens? What might be off? Tyvm for your help!</p>