Skip to content

Commit

Permalink
Allow empty contentTypeStartsWith in PostPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
skirsten committed Oct 16, 2022
1 parent 7d71d94 commit 671ccef
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions post-policy.go
Expand Up @@ -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",
Expand Down

0 comments on commit 671ccef

Please sign in to comment.