feat: support tags for PostPolicy upload (#19816)

This commit is contained in:
jiuker
2024-05-28 12:44:00 +08:00
committed by GitHub
parent 8f266e0772
commit c904ef966e
2 changed files with 16 additions and 1 deletions

View File

@@ -136,7 +136,7 @@ func setObjectHeaders(ctx context.Context, w http.ResponseWriter, objInfo Object
// Set tag count if object has tags
if len(objInfo.UserTags) > 0 {
tags, _ := tags.ParseObjectTags(objInfo.UserTags)
if tags.Count() > 0 {
if tags != nil && tags.Count() > 0 {
w.Header()[xhttp.AmzTagCount] = []string{strconv.Itoa(tags.Count())}
if opts.Tagging {
// This is MinIO only extension to return back tags along with the count.