Package io.minio
Class PostPolicy
java.lang.Object
io.minio.PostPolicy
Post policy information to be used to generate presigned post policy form-data. Condition
elements and respective condition for Post policy is available here.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContentLengthRangeCondition(int lowerLimit, int upperLimit) Add content-length-range condition with lower and upper limits.voidaddContentLengthRangeCondition(long lowerLimit, long upperLimit) Add content-length-range condition with lower and upper limits.voidaddEqualsCondition(String element, String value) Add equals condition of an element and value.voidaddStartsWithCondition(String element, String value) Add starts-with condition of an element and value.bucket()Get bucket name.formData(Credentials creds, String region) Return form-data of this post policy.voidRemove previously set content-length-range condition.voidremoveEqualsCondition(String element) Remove previously set equals condition of an element.voidremoveStartsWithCondition(String element) Remove previously set starts-with condition of an element.
-
Constructor Details
-
PostPolicy
-
-
Method Details
-
addEqualsCondition
Add equals condition of an element and value. -
removeEqualsCondition
Remove previously set equals condition of an element. -
addStartsWithCondition
Add starts-with condition of an element and value. Value set to empty string does matching any content condition. -
removeStartsWithCondition
Remove previously set starts-with condition of an element. -
addContentLengthRangeCondition
public void addContentLengthRangeCondition(long lowerLimit, long upperLimit) Add content-length-range condition with lower and upper limits. -
addContentLengthRangeCondition
public void addContentLengthRangeCondition(int lowerLimit, int upperLimit) Add content-length-range condition with lower and upper limits. -
removeContentLengthRangeCondition
public void removeContentLengthRangeCondition()Remove previously set content-length-range condition. -
formData
public Map<String,String> formData(@Nonnull Credentials creds, @Nonnull String region) throws MinioException Return form-data of this post policy. The returned map contains x-amz-algorithm, x-amz-credential, x-amz-security-token, x-amz-date, policy and x-amz-signature.- Throws:
MinioException
-
bucket
Get bucket name.
-