title: Uploading image to s3 bucket using presigned URL in flutter
body: <p>Upload function for uploading an image to s3 bucket using signed URL.</p>
  <pre><code>Future&lt;Response&lt;void&gt;&gt; upload({required String signedUrl, required File content, required Map&lt;String, dynamic&gt; headers}) async {
  Dio dio = Dio();
  
  var response = await dio.put(signedUrl, data: base64Encode(content.readAsBytesSync()), options: Options(headers: headers));
  
  print('response &gt;&gt;&gt; $response');
  return response;
  </code></pre>
  <p>}</p>
  <p>Headers:</p>
  <pre><code>&quot;headers&quot;: {
              &quot;Content-Type&quot;: &quot;image/png&quot;,
              &quot;Content-MD5&quot;: &quot;476ffdb4952b0a0769ca26f3d7df18c6&quot;,
              &quot;Content-Disposition&quot;: &quot;inline; filename=\&quot;image.png\&quot;; filename*=UTF-8''image.png&quot;
          }
  </code></pre>
  <p>I am getting a 403 response status code.</p>
  
  <p>I/flutter ( 7379): <Code>SignatureDoesNotMatch</Code>The request signature we calculated does not match the signature you provided. Check your key and signing method.AKIAST4W3MAKVUZSBN6KAWS4-HMAC-SHA256</p>