diff --git a/post-policy.go b/post-policy.go index 7aa96e0d6..7bf560304 100644 --- a/post-policy.go +++ b/post-policy.go @@ -197,8 +197,8 @@ func (p *PostPolicy) SetContentLengthRange(min, max int64) error { if min < 0 { return errInvalidArgument("Minimum limit cannot be negative.") } - if max < 0 { - return errInvalidArgument("Maximum limit cannot be negative.") + if max <= 0 { + return errInvalidArgument("Maximum limit cannot be non-positive.") } p.contentLengthRange.min = min p.contentLengthRange.max = max