Constructor and Description |
---|
PostPolicy(String bucketName,
ZonedDateTime expiration) |
Modifier and Type | Method and Description |
---|---|
void |
addContentLengthRangeCondition(int lowerLimit,
int upperLimit)
Add content-length-range condition with lower and upper limits.
|
void |
addContentLengthRangeCondition(long lowerLimit,
long upperLimit)
Add content-length-range condition with lower and upper limits.
|
void |
addEqualsCondition(String element,
String value)
Add equals condition of an element and value.
|
void |
addStartsWithCondition(String element,
String value)
Add starts-with condition of an element and value.
|
String |
bucket() |
Map<String,String> |
formData(Credentials creds,
String region)
Return form-data of this post policy.
|
void |
removeContentLengthRangeCondition()
Remove previously set content-length-range condition.
|
void |
removeEqualsCondition(String element)
Remove previously set equals condition of an element.
|
void |
removeStartsWithCondition(String element)
Remove previously set starts-with condition of an element.
|
public PostPolicy(@Nonnull String bucketName, @Nonnull ZonedDateTime expiration)
public void addEqualsCondition(@Nonnull String element, @Nonnull String value)
public void removeEqualsCondition(@Nonnull String element)
public void addStartsWithCondition(@Nonnull String element, @Nonnull String value)
public void removeStartsWithCondition(String element)
public void addContentLengthRangeCondition(long lowerLimit, long upperLimit)
public void addContentLengthRangeCondition(int lowerLimit, int upperLimit)
public void removeContentLengthRangeCondition()
public Map<String,String> formData(@Nonnull Credentials creds, @Nonnull String region) throws NoSuchAlgorithmException, InvalidKeyException
public String bucket()