s3: add support for PostPolicy

fix https://github.com/chrislusf/seaweedfs/issues/1426
This commit is contained in:
Chris Lu committed 2020-09-19 20:14:19 -07:00
1 parent 41d508edfd
commit 29abe980df
11 files changed
+1482 -3

No files matched your search

+3
View File
@@ -87,6 +87,9 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) {
// ListObjectsV1 (Legacy)
bucket.Methods("GET").HandlerFunc(stats(s3a.iam.Auth(s3a.ListObjectsV1Handler, ACTION_READ), "LIST"))
// PostPolicy
bucket.Methods("POST").HeadersRegexp("Content-Type", "multipart/form-data*").HandlerFunc(stats(s3a.iam.Auth(s3a.PutBucketPolicyHandler, ACTION_WRITE), "POST"))
// DeleteMultipleObjects
bucket.Methods("POST").HandlerFunc(stats(s3a.iam.Auth(s3a.DeleteMultipleObjectsHandler, ACTION_WRITE), "DELETE")).Queries("delete", "")
/*