title: How to set Policy conditions in Java AWS S3 SDK presigned url
body: <p>I use Java AWS S3 SDK to presign my requests. I have the following code:</p>
  <pre><code>var request = new GeneratePresignedUrlRequest(bucketName, filename)
          .withMethod(method)
          .withExpiration(expiration());
  
  // do something with request
  
  return s3Client.generatePresignedUrl(request);
  </code></pre>
  <p>What I need to write in place of comment to add custom conditions like <code>content-length-range</code>?</p>