Browse Source
[s3] Fixed s3 replication by sending content-md as base64 (#5596)
pull/5600/head
Martin Stiborský
7 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
weed/replication/sink/s3sink/s3_sink.go
|
@ -11,6 +11,7 @@ import ( |
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" |
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" |
|
|
"strconv" |
|
|
"strconv" |
|
|
"strings" |
|
|
"strings" |
|
|
|
|
|
"encoding/base64" |
|
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/filer" |
|
|
"github.com/seaweedfs/seaweedfs/weed/filer" |
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
@ -202,7 +203,7 @@ func (s3sink *S3Sink) CreateEntry(key string, entry *filer_pb.Entry, signatures |
|
|
Tagging: aws.String(tags), |
|
|
Tagging: aws.String(tags), |
|
|
} |
|
|
} |
|
|
if len(entry.Attributes.Md5) > 0 { |
|
|
if len(entry.Attributes.Md5) > 0 { |
|
|
uploadInput.ContentMD5 = aws.String(fmt.Sprintf("%x", entry.Attributes.Md5)) |
|
|
|
|
|
|
|
|
uploadInput.ContentMD5 = aws.String(base64.StdEncoding.EncodeToString([]byte(entry.Attributes.Md5))) |
|
|
} |
|
|
} |
|
|
_, err = uploader.Upload(&uploadInput) |
|
|
_, err = uploader.Upload(&uploadInput) |
|
|
|
|
|
|
|
|