diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-03-11 09:49:40 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-03-11 09:49:40 -0800 |
| commit | 79280e151396d3b4aab13d8f78b944d6038a21e3 (patch) | |
| tree | e252af373fa4054241e68c6802204aead3e57719 /weed/s3api/s3api_object_handlers_postpolicy.go | |
| parent | 2e197604422214abd1034ee93ab38ab588e110e5 (diff) | |
| download | seaweedfs-79280e151396d3b4aab13d8f78b944d6038a21e3.tar.xz seaweedfs-79280e151396d3b4aab13d8f78b944d6038a21e3.zip | |
escape special characters
fix https://github.com/chrislusf/seaweedfs/issues/1884
Diffstat (limited to 'weed/s3api/s3api_object_handlers_postpolicy.go')
| -rw-r--r-- | weed/s3api/s3api_object_handlers_postpolicy.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/s3api/s3api_object_handlers_postpolicy.go b/weed/s3api/s3api_object_handlers_postpolicy.go index 383eac943..035302ae6 100644 --- a/weed/s3api/s3api_object_handlers_postpolicy.go +++ b/weed/s3api/s3api_object_handlers_postpolicy.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/base64" "errors" + "fmt" "github.com/chrislusf/seaweedfs/weed/s3api/policy" "github.com/chrislusf/seaweedfs/weed/s3api/s3err" "github.com/dustin/go-humanize" @@ -109,7 +110,7 @@ func (s3a *S3ApiServer) PostPolicyBucketHandler(w http.ResponseWriter, r *http.R } } - uploadUrl := s3a.buildUploadUrl(bucket, object) + uploadUrl := fmt.Sprintf("http://%s%s/%s%s", s3a.option.Filer, s3a.option.BucketsPath, bucket, urlPathEscape(object)) etag, errCode := s3a.putToFiler(r, uploadUrl, fileBody) |
