aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-09-25 02:41:21 -0700
committerChris Lu <chris.lu@gmail.com>2020-09-25 02:41:38 -0700
commit35f6518c365a663d7642aabd39c655ce7143b0b6 (patch)
tree15dade7a4c9de97d840c02486b49c9d80711a2b4
parent22049dc2e6b426839d47584bb1584d89ebc8cb2e (diff)
downloadseaweedfs-35f6518c365a663d7642aabd39c655ce7143b0b6.tar.xz
seaweedfs-35f6518c365a663d7642aabd39c655ce7143b0b6.zip
weed upload: usePublicUrl was not being used on big files
fix https://github.com/chrislusf/seaweedfs/issues/1492
-rw-r--r--weed/operation/submit.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/operation/submit.go b/weed/operation/submit.go
index e8bec382a..25843c892 100644
--- a/weed/operation/submit.go
+++ b/weed/operation/submit.go
@@ -170,6 +170,9 @@ func (fi FilePart) Upload(maxMB int, master string, usePublicUrl bool, jwt secur
}
}
fileUrl := "http://" + ret.Url + "/" + id
+ if usePublicUrl {
+ fileUrl = "http://" + ret.PublicUrl + "/" + id
+ }
count, e := upload_one_chunk(
baseName+"-"+strconv.FormatInt(i+1, 10),
io.LimitReader(fi.Reader, chunkSize),