From ab24c583a24824a1bb2ab142080656f1a72dc219 Mon Sep 17 00:00:00 2001 From: Preben Berg Date: Fri, 6 Dec 2019 23:15:44 +0100 Subject: [PATCH] Remove dash from DeleteKey for 3rd party S3 compatibility --- 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