title: Amazon S3 Multipart Upload Using Query String Authentication and .Net SDK
body: <p>Our requirement is to <strong><code>upload objects in Amazon S3 using a browser based interface</code></strong>. For this we're utilizing <code>Query String Authentication</code> mechanism (we don't have end-user's credentials during the upload process and we're using ASP.Net to write code to do so. I'm running into issues when trying to do multipart uploads. </p>
  
  <p>I'm using AWS .Net SDK (version 2.0.2.5) to create a query string using the following code below:</p>
  
  <pre><code>            GetPreSignedUrlRequest request = new GetPreSignedUrlRequest()
              {
                  BucketName = bucketName,
                  Key = objectKey,
                  Expires = expiryTime,
                  Protocol = Amazon.S3.Protocol.HTTP,
                  Verb = Amazon.S3.HttpVerb.PUT,
                  ContentType = "application/octet-stream,
              };
  
  var url = AWSClientFactory.CreateAmazonS3Client(credentials, region).GetPreSignedURL(request);
  </code></pre>
  
  <p>This works great if I don't do multi-part upload. However I'm not able to figure out how to do a multipart upload using Query String.</p>
  
  <p>Problems that I'm running into are:</p>
  
  <ol>
  <li>In order to do a multipart upload, I need to get an <code>UploadId</code> first. However the method to get <code>UploadId</code> is a <code>POST</code> HTTP Request and <code>GetPreSignedUrlRequest</code> method does not take <code>POST</code> as an HTTP verb.</li>
  <li>I finally ended up putting a bucket policy where I granted my Amazon S3 account permission on the bucket in question (which does not belong to me) and using that account I am doing HTTP POST to get <code>UploadId</code>.</li>
  <li>Now based on my understanding, the query string must contain <code>UploadId</code> and <code>PartNumber</code> parameters when creating the query string authentication URL but looking at <code>GetPreSignedUrlRequest</code> object properties, I can't figure out how to specify these parameters there.</li>
  </ol>
  
  <p>I am inclined to believe that .Net SDK does not support this scenario and I have to resort to native REST API to create query string. Is my understanding correct?</p>
  
  <p>Any insights into this would be highly appreciated.</p>
  
  <p>Happy New Year in advance.</p>