Remove dash from DeleteKey for 3rd party S3 compatibility (#192)

This commit is contained in:
Preben Uhrskov Berg 2020-03-07 05:49:42 +07:00 committed by GitHub
parent cf0a30f46a
commit a86a144485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,7 @@ func (b S3Backend) Get(key string) (metadata backends.Metadata, r io.ReadCloser,
func mapMetadata(m backends.Metadata) map[string]*string { func mapMetadata(m backends.Metadata) map[string]*string {
return map[string]*string{ return map[string]*string{
"Expiry": aws.String(strconv.FormatInt(m.Expiry.Unix(), 10)), "Expiry": aws.String(strconv.FormatInt(m.Expiry.Unix(), 10)),
"Delete_key": aws.String(m.DeleteKey), "Deletekey": aws.String(m.DeleteKey),
"Size": aws.String(strconv.FormatInt(m.Size, 10)), "Size": aws.String(strconv.FormatInt(m.Size, 10)),
"Mimetype": aws.String(m.Mimetype), "Mimetype": aws.String(m.Mimetype),
"Sha256sum": aws.String(m.Sha256sum), "Sha256sum": aws.String(m.Sha256sum),
@ -101,7 +101,7 @@ func unmapMetadata(input map[string]*string) (m backends.Metadata, err error) {
return return
} }
m.DeleteKey = aws.StringValue(input["Delete_key"]) m.DeleteKey = aws.StringValue(input["Deletekey"])
m.Mimetype = aws.StringValue(input["Mimetype"]) m.Mimetype = aws.StringValue(input["Mimetype"])
m.Sha256sum = aws.StringValue(input["Sha256sum"]) m.Sha256sum = aws.StringValue(input["Sha256sum"])
return return