mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 12:42:25 -05:00 
			
		
		
		
	[chore]: Bump github.com/minio/minio-go/v7 from 7.0.70 to 7.0.71 (#2988)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.70 to 7.0.71. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.70...v7.0.71) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								048339a6aa
							
						
					
				
			
			
				commit
				
					
						83ee766e34
					
				
			
		
					 8 changed files with 179 additions and 5 deletions
				
			
		
							
								
								
									
										23
									
								
								vendor/github.com/minio/minio-go/v7/post-policy.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								vendor/github.com/minio/minio-go/v7/post-policy.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -19,12 +19,14 @@ package minio | |||
| 
 | ||||
| import ( | ||||
| 	"encoding/base64" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"net/http" | ||||
| 	"strings" | ||||
| 	"time" | ||||
| 
 | ||||
| 	"github.com/minio/minio-go/v7/pkg/encrypt" | ||||
| 	"github.com/minio/minio-go/v7/pkg/tags" | ||||
| ) | ||||
| 
 | ||||
| // expirationDateFormat date format for expiration key in json policy. | ||||
|  | @ -152,6 +154,27 @@ func (p *PostPolicy) SetCondition(matchType, condition, value string) error { | |||
| 	return errInvalidArgument("Invalid condition in policy") | ||||
| } | ||||
| 
 | ||||
| // SetTagging - Sets tagging for the object for this policy based upload. | ||||
| func (p *PostPolicy) SetTagging(tagging string) error { | ||||
| 	if strings.TrimSpace(tagging) == "" || tagging == "" { | ||||
| 		return errInvalidArgument("No tagging specified.") | ||||
| 	} | ||||
| 	_, err := tags.ParseObjectXML(strings.NewReader(tagging)) | ||||
| 	if err != nil { | ||||
| 		return errors.New("The XML you provided was not well-formed or did not validate against our published schema.") //nolint | ||||
| 	} | ||||
| 	policyCond := policyCondition{ | ||||
| 		matchType: "eq", | ||||
| 		condition: "$tagging", | ||||
| 		value:     tagging, | ||||
| 	} | ||||
| 	if err := p.addNewPolicy(policyCond); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	p.formData["tagging"] = tagging | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| // SetContentType - Sets content-type of the object for this policy | ||||
| // based upload. | ||||
| func (p *PostPolicy) SetContentType(contentType string) error { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue