From 671ccefae4746253ecb6c20ae2aa8b1f5358425e Mon Sep 17 00:00:00 2001 From: Simon Kirsten Date: Mon, 17 Oct 2022 00:41:48 +0200 Subject: [PATCH] Allow empty contentTypeStartsWith in PostPolicy --- post-policy.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/post-policy.go b/post-policy.go index 06bf78b69f..9ac0b6ecdf 100644 --- a/post-policy.go +++ b/post-policy.go @@ -172,9 +172,6 @@ func (p *PostPolicy) SetContentType(contentType string) error { // SetContentTypeStartsWith - Sets what content-type of the object for this policy // based upload can start with. func (p *PostPolicy) SetContentTypeStartsWith(contentTypeStartsWith string) error { - if strings.TrimSpace(contentTypeStartsWith) == "" || contentTypeStartsWith == "" { - return errInvalidArgument("No content type specified.") - } policyCond := policyCondition{ matchType: "starts-with", condition: "$Content-Type",