aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/upload_content.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-02-18 14:05:28 +0800
committerbingoohuang <bingoo.huang@gmail.com>2021-02-18 14:05:28 +0800
commiteab6e31d34bb22beeb1ca416596c44b1590075c0 (patch)
tree5fba6e0c8a4a5a1cf54051fb8025948e20b54d42 /weed/operation/upload_content.go
parent12a78335860c4b1e220748e4adc4097050af5272 (diff)
downloadseaweedfs-eab6e31d34bb22beeb1ca416596c44b1590075c0.tar.xz
seaweedfs-eab6e31d34bb22beeb1ca416596c44b1590075c0.zip
use backticks instead of double quotes to avoid escaped additionally in regex
Diffstat (limited to 'weed/operation/upload_content.go')
-rw-r--r--weed/operation/upload_content.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index fccc24b16..abb13bbf7 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -62,7 +62,7 @@ func init() {
}}
}
-var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"")
+var fileNameEscaper = strings.NewReplacer(`\`, `\\`, `"`, `\"`)
// Upload sends a POST request to a volume server to upload the content with adjustable compression level
func UploadData(uploadUrl string, filename string, cipher bool, data []byte, isInputCompressed bool, mtype string, pairMap map[string]string, jwt security.EncodedJwt) (uploadResult *UploadResult, err error) {