mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 08:40:05 +08:00
filer: option to encrypt data on volume server
This commit is contained in:
@@ -50,6 +50,7 @@ func (fs *FilerSink) replicateOneChunk(sourceChunk *filer_pb.FileChunk, dir stri
|
||||
Mtime: sourceChunk.Mtime,
|
||||
ETag: sourceChunk.ETag,
|
||||
SourceFileId: sourceChunk.GetFileIdString(),
|
||||
CipherKey: sourceChunk.CipherKey,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -95,8 +96,8 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, dir string)
|
||||
|
||||
glog.V(4).Infof("replicating %s to %s header:%+v", filename, fileUrl, header)
|
||||
|
||||
uploadResult, err := operation.Upload(fileUrl, filename, readCloser,
|
||||
"gzip" == header.Get("Content-Encoding"), header.Get("Content-Type"), nil, auth)
|
||||
// fetch data as is, regardless whether it is encrypted or not
|
||||
uploadResult, err := operation.Upload(fileUrl, filename, false, readCloser, "gzip" == header.Get("Content-Encoding"), header.Get("Content-Type"), nil, auth)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("upload data %v to %s: %v", filename, fileUrl, err)
|
||||
return "", fmt.Errorf("upload data: %v", err)
|
||||
|
Reference in New Issue
Block a user