fix(ks3): fix content disposition format for download filename (#3040) (#3057)

This commit is contained in:
Darren Yu
2025-12-05 15:33:18 +08:00
committed by GitHub
parent fec4dec3ac
commit a08c796e3f

View File

@@ -347,7 +347,7 @@ func (handler *Driver) Source(ctx context.Context, e fs.Entity, args *driver.Get
var contentDescription *string
if args.IsDownload {
encodedFilename := url.PathEscape(args.DisplayName)
contentDescription = aws.String(fmt.Sprintf(`attachment; filename="%s"`, encodedFilename))
contentDescription = aws.String(fmt.Sprintf(`attachment; filename=%s`, encodedFilename))
}
// 确保过期时间不小于 0 ,如果小于则设置为 7 天