diff options
| author | bingoohuang <bingoo.huang@gmail.com> | 2021-02-18 14:05:28 +0800 |
|---|---|---|
| committer | bingoohuang <bingoo.huang@gmail.com> | 2021-02-18 14:05:28 +0800 |
| commit | eab6e31d34bb22beeb1ca416596c44b1590075c0 (patch) | |
| tree | 5fba6e0c8a4a5a1cf54051fb8025948e20b54d42 /weed/operation/upload_content.go | |
| parent | 12a78335860c4b1e220748e4adc4097050af5272 (diff) | |
| download | seaweedfs-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.go | 2 |
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) { |
