aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/wfs_write.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-01-24 19:03:02 -0800
committerChris Lu <chris.lu@gmail.com>2021-01-24 19:03:02 -0800
commit17f7c1c43f8adc1d1e4d795f23cdf60aa0e57c95 (patch)
tree16817aa710170550530543e7b1c0f0effd2b2400 /weed/filesys/wfs_write.go
parent9bcb28a3eabcb2c869afc52da6b0341e8e2d8427 (diff)
parent00707ec00fb8016ac9ef8858a01a9784a6aee1a0 (diff)
downloadseaweedfs-17f7c1c43f8adc1d1e4d795f23cdf60aa0e57c95.tar.xz
seaweedfs-17f7c1c43f8adc1d1e4d795f23cdf60aa0e57c95.zip
Merge branch 'mount_from_outside_cluster'
Diffstat (limited to 'weed/filesys/wfs_write.go')
-rw-r--r--weed/filesys/wfs_write.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/filesys/wfs_write.go b/weed/filesys/wfs_write.go
index 83e40e7f5..dfe6e57a6 100644
--- a/weed/filesys/wfs_write.go
+++ b/weed/filesys/wfs_write.go
@@ -44,7 +44,7 @@ func (wfs *WFS) saveDataAsChunk(fullPath util.FullPath) filer.SaveDataAsChunkFun
Url: resp.Url,
PublicUrl: resp.PublicUrl,
}
- host = wfs.AdjustedUrl(loc)
+ host = loc.Url
collection, replication = resp.Collection, resp.Replication
return nil
@@ -53,6 +53,9 @@ func (wfs *WFS) saveDataAsChunk(fullPath util.FullPath) filer.SaveDataAsChunkFun
}
fileUrl := fmt.Sprintf("http://%s/%s", host, fileId)
+ if wfs.option.OutsideContainerClusterMode {
+ fileUrl = fmt.Sprintf("http://%s/?proxyChunkId=%s", wfs.option.FilerAddress, fileId)
+ }
uploadResult, err, data := operation.Upload(fileUrl, filename, wfs.option.Cipher, reader, false, "", nil, auth)
if err != nil {
glog.V(0).Infof("upload data %v to %s: %v", filename, fileUrl, err)