diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-09-06 16:20:49 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-09-06 16:20:49 -0700 |
| commit | 6923af7280ed341ce90313df5e8eabaaf8e7aa47 (patch) | |
| tree | 57db6d3e15db9b85a966c84a51e78c3b590163e2 /weed/filesys/wfs_write.go | |
| parent | 64f6532fbeb5e35028a19717186f712a14cbd13e (diff) | |
| download | seaweedfs-6923af7280ed341ce90313df5e8eabaaf8e7aa47.tar.xz seaweedfs-6923af7280ed341ce90313df5e8eabaaf8e7aa47.zip | |
refactoring
Diffstat (limited to 'weed/filesys/wfs_write.go')
| -rw-r--r-- | weed/filesys/wfs_write.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/weed/filesys/wfs_write.go b/weed/filesys/wfs_write.go index 42c13cfd0..ea8de24d5 100644 --- a/weed/filesys/wfs_write.go +++ b/weed/filesys/wfs_write.go @@ -58,7 +58,16 @@ func (wfs *WFS) saveDataAsChunk(fullPath util.FullPath, writeOnly bool) filer.Sa if wfs.option.VolumeServerAccess == "filerProxy" { fileUrl = fmt.Sprintf("http://%s/?proxyChunkId=%s", wfs.getCurrentFiler(), fileId) } - uploadResult, err, data := operation.Upload(fileUrl, filename, wfs.option.Cipher, reader, false, "", nil, auth) + uploadOption := &operation.UploadOption{ + UploadUrl: fileUrl, + Filename: filename, + Cipher: wfs.option.Cipher, + IsInputCompressed: false, + MimeType: "", + PairMap: nil, + Jwt: auth, + } + uploadResult, err, data := operation.Upload(reader, uploadOption) if err != nil { glog.V(0).Infof("upload data %v to %s: %v", filename, fileUrl, err) return nil, "", "", fmt.Errorf("upload data: %v", err) |
