@@ -56,8 +56,8 @@ public class PostPolicy {
56
56
private String bucketName ;
57
57
private ZonedDateTime expiration ;
58
58
private Map <String , Map <String , String >> conditions ;
59
- private Integer lowerLimit = null ;
60
- private Integer upperLimit = null ;
59
+ private Long lowerLimit = null ;
60
+ private Long upperLimit = null ;
61
61
62
62
public PostPolicy (@ Nonnull String bucketName , @ Nonnull ZonedDateTime expiration ) {
63
63
if (bucketName .isEmpty ()) {
@@ -140,7 +140,7 @@ public void removeStartsWithCondition(String element) {
140
140
}
141
141
142
142
/** Add content-length-range condition with lower and upper limits. */
143
- public void addContentLengthRangeCondition (int lowerLimit , int upperLimit ) {
143
+ public void addContentLengthRangeCondition (long lowerLimit , long upperLimit ) {
144
144
if (lowerLimit < 0 ) {
145
145
throw new IllegalArgumentException ("lower limit cannot be negative number" );
146
146
}
@@ -157,6 +157,11 @@ public void addContentLengthRangeCondition(int lowerLimit, int upperLimit) {
157
157
this .upperLimit = upperLimit ;
158
158
}
159
159
160
+ /** Add content-length-range condition with lower and upper limits. */
161
+ public void addContentLengthRangeCondition (int lowerLimit , int upperLimit ) {
162
+ this .addContentLengthRangeCondition ((long ) lowerLimit , (long ) upperLimit );
163
+ }
164
+
160
165
/** Remove previously set content-length-range condition. */
161
166
public void removeContentLengthRangeCondition () {
162
167
this .lowerLimit = null ;
0 commit comments