code: public Map<String, String> presignedPostPolicy(PostPolicy policy)
      throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
             InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
             InternalException, InvalidArgumentException {
      return policy.formData(this.accessKey, this.secretKey, getRegion(policy.bucketName()));
    }
docs: Returns string map for given {@link PostPolicy} to upload object with various post policy conditions.
  
  </p><b>Example:</b><br>
  <pre>{@code // Create new PostPolicy object for 'my-bucketname', 'my-objectname' and 7 days expire time from now.
  PostPolicy policy = new PostPolicy("my-bucketname", "my-objectname", DateTime.now().plusDays(7));
  // 'my-objectname' should be 'image/png' content type
  policy.setContentType("image/png");
  Map<String,String> formData = minioClient.presignedPostPolicy(policy);
  // Print a curl command that can be executable with the file /tmp/userpic.png and the file will be uploaded.
  System.out.print("curl -X POST ");
  for (Map.Entry<String,String> entry : formData.entrySet()) {
  System.out.print(" -F " + entry.getKey() + "=" + entry.getValue());
  }
  System.out.println(" -F file=@/tmp/userpic.png https://play.min.io:9000/my-bucketname"); }</pre>
  
  @param policy Post policy of an object.
  @return Map of strings to construct form-data.
  
  @throws InvalidBucketNameException  upon invalid bucket name is given
  @throws NoSuchAlgorithmException
  upon requested algorithm was not found during signature calculation
  @throws InsufficientDataException  upon getting EOFException while reading given
  InputStream even before reading given length
  @throws IOException                 upon connection error
  @throws InvalidKeyException
  upon an invalid access key or secret key
  @throws NoResponseException         upon no response from server
  @throws XmlPullParserException      upon parsing response xml
  @throws ErrorResponseException      upon unsuccessful execution
  @throws InternalException           upon internal library error
  @throws InvalidArgumentException    upon invalid value is passed to a method.
  
  @see PostPolicy