diff --git a/weed/s3api/s3api_object_multipart_handlers.go b/weed/s3api/s3api_object_multipart_handlers.go new file mode 100644 index 000000000..6e2c96ddd --- /dev/null +++ b/weed/s3api/s3api_object_multipart_handlers.go @@ -0,0 +1,40 @@ +package s3api + +import ( + "net/http" +) + +// NewMultipartUploadHandler - New multipart upload. +func (api *S3ApiServer) NewMultipartUploadHandler(w http.ResponseWriter, r *http.Request) { + +} + +// CompleteMultipartUploadHandler - Completes multipart upload. +func (api *S3ApiServer) CompleteMultipartUploadHandler(w http.ResponseWriter, r *http.Request) { + +} + +// AbortMultipartUploadHandler - Aborts multipart upload. +func (api *S3ApiServer) AbortMultipartUploadHandler(w http.ResponseWriter, r *http.Request) { + +} + +// ListMultipartUploadsHandler - Lists multipart uploads. +func (api *S3ApiServer) ListMultipartUploadsHandler(w http.ResponseWriter, r *http.Request) { + +} + +// ListObjectPartsHandler - Lists object parts in a multipart upload. +func (api *S3ApiServer) ListObjectPartsHandler(w http.ResponseWriter, r *http.Request) { + +} + +// PutObjectPartHandler - Put an object part in a multipart upload. +func (api *S3ApiServer) PutObjectPartHandler(w http.ResponseWriter, r *http.Request) { + +} + +// DeleteMultipleObjectsHandler - Delete an object part in a multipart upload. +func (api *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *http.Request) { + +} diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.go index 0b3826625..2cc063098 100644 --- a/weed/s3api/s3api_server.go +++ b/weed/s3api/s3api_server.go @@ -53,6 +53,21 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) { // HeadBucket bucket.Methods("HEAD").HandlerFunc(s3a.HeadBucketHandler) + // PutObjectPart + bucket.Methods("PUT").Path("/{object:.+}").HandlerFunc(s3a.PutObjectPartHandler).Queries("partNumber", "{partNumber:[0-9]+}", "uploadId", "{uploadId:.*}") + // CompleteMultipartUpload + bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(s3a.CompleteMultipartUploadHandler).Queries("uploadId", "{uploadId:.*}") + // NewMultipartUpload + bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(s3a.NewMultipartUploadHandler).Queries("uploads", "") + // DeleteMultipleObjects + bucket.Methods("POST").HandlerFunc(s3a.DeleteMultipleObjectsHandler).Queries("delete", "") + // AbortMultipartUpload + bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(s3a.AbortMultipartUploadHandler).Queries("uploadId", "{uploadId:.*}") + // ListObjectParts + bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(s3a.ListObjectPartsHandler).Queries("uploadId", "{uploadId:.*}") + // ListMultipartUploads + bucket.Methods("GET").HandlerFunc(s3a.ListMultipartUploadsHandler).Queries("uploads", "") + // DeleteObject bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(s3a.DeleteObjectHandler) // DeleteBucket @@ -71,21 +86,6 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) { // CopyObjectPart bucket.Methods("PUT").Path("/{object:.+}").HeadersRegexp("X-Amz-Copy-Source", ".*?(\\/|%2F).*?").HandlerFunc(s3a.CopyObjectPartHandler).Queries("partNumber", "{partNumber:[0-9]+}", "uploadId", "{uploadId:.*}") - // PutObjectPart - bucket.Methods("PUT").Path("/{object:.+}").HandlerFunc(s3a.PutObjectPartHandler).Queries("partNumber", "{partNumber:[0-9]+}", "uploadId", "{uploadId:.*}") - // ListObjectParts - bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(s3a.ListObjectPartsHandler).Queries("uploadId", "{uploadId:.*}") - // CompleteMultipartUpload - bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(s3a.CompleteMultipartUploadHandler).Queries("uploadId", "{uploadId:.*}") - // NewMultipartUpload - bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(s3a.NewMultipartUploadHandler).Queries("uploads", "") - // AbortMultipartUpload - bucket.Methods("DELETE").Path("/{object:.+}").HandlerFunc(s3a.AbortMultipartUploadHandler).Queries("uploadId", "{uploadId:.*}") - - // ListMultipartUploads - bucket.Methods("GET").HandlerFunc(s3a.ListMultipartUploadsHandler).Queries("uploads", "") - // DeleteMultipleObjects - bucket.Methods("POST").HandlerFunc(s3a.DeleteMultipleObjectsHandler).Queries("delete", "") // not implemented // GetBucketLocation