From 65c43676893a2e3d207b186a1560eb490d4874ab Mon Sep 17 00:00:00 2001 From: AaronLiu Date: Fri, 30 Jul 2021 11:22:18 +0800 Subject: [PATCH] Revert "delete $name policy (#831)" (#961) This reverts commit e6959a5026c3c09b4b74c548b3ca409e242cb189. --- pkg/filesystem/driver/s3/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/filesystem/driver/s3/handler.go b/pkg/filesystem/driver/s3/handler.go index 9a37a92..b338d8f 100644 --- a/pkg/filesystem/driver/s3/handler.go +++ b/pkg/filesystem/driver/s3/handler.go @@ -344,6 +344,7 @@ func (handler Driver) Token(ctx context.Context, TTL int64, key string) (seriali map[string]string{"bucket": handler.Policy.BucketName}, []string{"starts-with", "$key", savePath}, []string{"starts-with", "$success_action_redirect", apiURL.String()}, + []string{"starts-with", "$name", ""}, []string{"starts-with", "$Content-Type", ""}, map[string]string{"x-amz-algorithm": "AWS4-HMAC-SHA256"}, },