add back "/" prefix if it is missing in object

fix https://github.com/seaweedfs/seaweedfs/issues/3737
This commit is contained in:
chrislu
2022-10-29 17:54:30 -07:00
parent 0d9f2f9e7a
commit 8b9957d461
5 changed files with 48 additions and 6 deletions

View File

@@ -113,7 +113,7 @@ func (s3a *S3ApiServer) PostPolicyBucketHandler(w http.ResponseWriter, r *http.R
}
}
uploadUrl := fmt.Sprintf("http://%s%s/%s%s", s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, bucket, urlPathEscape(object))
uploadUrl := fmt.Sprintf("http://%s%s/%s%s", s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, bucket, urlEscapeObject(object))
etag, errCode := s3a.putToFiler(r, uploadUrl, fileBody, "")