diff options
Diffstat (limited to 'weed/operation/upload_content.go')
| -rw-r--r-- | weed/operation/upload_content.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index ee72d1285..c9b15da69 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -30,6 +30,7 @@ type UploadOption struct { PairMap map[string]string Jwt security.EncodedJwt RetryForever bool + Md5 string } type UploadResult struct { @@ -254,6 +255,7 @@ func doUploadData(data []byte, option *UploadOption) (uploadResult *UploadResult MimeType: option.MimeType, PairMap: option.PairMap, Jwt: option.Jwt, + Md5: option.Md5, }) if uploadResult == nil { return @@ -284,6 +286,9 @@ func upload_content(fillBufferFunction func(w io.Writer) error, originalDataSize if option.IsInputCompressed { h.Set("Content-Encoding", "gzip") } + if option.Md5 != "" { + h.Set("Content-MD5", option.Md5) + } file_writer, cp_err := body_writer.CreatePart(h) if cp_err != nil { |
