From a86a1444854a3f769ea5baf17a92f965f41298b7 Mon Sep 17 00:00:00 2001 From: Preben Uhrskov Berg Date: Sat, 7 Mar 2020 05:49:42 +0700 Subject: [PATCH] Remove dash from DeleteKey for 3rd party S3 compatibility (#192) --- backends/s3/s3.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backends/s3/s3.go b/backends/s3/s3.go index fc2a1b0..65f44b3 100644 --- a/backends/s3/s3.go +++ b/backends/s3/s3.go @@ -81,11 +81,11 @@ func (b S3Backend) Get(key string) (metadata backends.Metadata, r io.ReadCloser, func mapMetadata(m backends.Metadata) map[string]*string { return map[string]*string{ - "Expiry": aws.String(strconv.FormatInt(m.Expiry.Unix(), 10)), - "Delete_key": aws.String(m.DeleteKey), - "Size": aws.String(strconv.FormatInt(m.Size, 10)), - "Mimetype": aws.String(m.Mimetype), - "Sha256sum": aws.String(m.Sha256sum), + "Expiry": aws.String(strconv.FormatInt(m.Expiry.Unix(), 10)), + "Deletekey": aws.String(m.DeleteKey), + "Size": aws.String(strconv.FormatInt(m.Size, 10)), + "Mimetype": aws.String(m.Mimetype), + "Sha256sum": aws.String(m.Sha256sum), } } @@ -101,7 +101,7 @@ func unmapMetadata(input map[string]*string) (m backends.Metadata, err error) { return } - m.DeleteKey = aws.StringValue(input["Delete_key"]) + m.DeleteKey = aws.StringValue(input["Deletekey"]) m.Mimetype = aws.StringValue(input["Mimetype"]) m.Sha256sum = aws.StringValue(input["Sha256sum"]) return