title: Error on uploading mutlipart data from Javascript to S3 using pre singed url from .net core API
body: <p>I am generating the pre-signed URL using the below code in .NET(API/Backend).</p>
  <pre><code>var preSignedUrlRequest = new GetPreSignedUrlRequest
  {
      BucketName = bucketName,
      Key = keyName,
      UploadId = data.UploadID,
      PartNumber = data.PartNumber,
      Expires = DateTime.Now.AddMinutes(1440),
      //Protocol = (Protocol.HTTPS),
      Verb = HttpVerb.PUT
      //ContentType = data.ContentType,
  
  };
  var url = s3Client.GetPreSignedURL(preSignedUrlRequest);
  </code></pre>
  <p>And send back to the frontend (Javascript file run at <a href="http://127.0.0.1:5500/index.html" rel="nofollow noreferrer">http://127.0.0.1:5500/index.html</a>) to upload file bytes directly to S3.</p>
  <pre><code>for (let index = 1; index &lt; NUM_CHUNKS + 1; index++) {
      start = (index - 1) * FILE_CHUNK_SIZE
      end = (index) * FILE_CHUNK_SIZE
      blob = (index &lt; NUM_CHUNKS) ? state.selectedFile.slice(start, end) : state.selectedFile.slice(start)
  
      const sData = {
              fileName: state.fileName,
              partNumber: index,
              uploadID: state.uploadId,
              contentType: 'application/x-www-form-urlencoded; charset=UTF-8'
          }
      let res = await axios.post(`${state.backendUrl}/FileUpload/GetUrlForEachPart`, sData);
      let presignedUrl = res.data;
      if(!presignedUrl) return;
  
      let uploadResp = axios.put(
          presignedUrl,
          blob
           , { headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'}}
      );
      promisesArray.push(uploadResp)
  }
  </code></pre>
  <p>But getting the following error:</p>
  <pre><code>&lt;Error&gt;
     &lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;
     &lt;Message&gt;
      The request signature we calculated does not match the signature you provided. Check your key and signing method.
     &lt;/Message&gt;
     &lt;AWSAccessKeyId&gt;
    SomeKey
     &lt;/AWSAccessKeyId&gt;
     &lt;StringToSign&gt;
        PUT
        application/x-www-form-urlencoded;charset=utf-8
        1619642107
        /bucketname/profile_pictures/563131de-1359-4efb-b971-ad64ffffb424.jpg?partNumber=1&amp;uploadId=fz8XMvcY7PRLLTq5TnF22oMEblJxq9cAgx8NnogKlU86W11DNeIVlvceWUICtTKAuUBafdY9UiguWHCDAEqKLFay6Mz8_DfFBaFCITfJdo3ronBL92xPHA9js02JY54v
      &lt;/StringToSign&gt;
      &lt;SignatureProvided&gt;
        xEKWu7sASAVBvdT0fXtN+fMCg3k=
      &lt;/SignatureProvided&gt;
      &lt;StringToSignBytes&gt;
        50 55 54 0a 43 6f 6e 74 65 6e 74 4d 44 35 0a 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77 77 77 2d 66 6f 
       &lt;/StringToSignBytes&gt;
       &lt;RequestId&gt;AAKH5YH55KGG7ME4&lt;/RequestId&gt;
       &lt;HostId&gt;8FbaBlqRefB1BWdqDkOvZbWijFr6RTUvO8olEiEkNnytXbA01FECI2bplM=&lt;/HostId&gt;
  &lt;/Error&gt;
  </code></pre>
  <p>I am trying to fix it from yesterday and try many solutions of stackoverflow. But no luck.</p>
  <p>If anyone figure out my mistake, it will be a great help.
  Thanks</p>
  <p>NB: there is no use with my credentials. I can upload the file bytes from backend without pre-signed url.</p>