From 729a26c227a971100061189f8ba05e8a994833b7 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 15 Jun 2021 13:00:24 +0900 Subject: [PATCH] Add support for copyTo via rewriteTo (#512) --- fakestorage/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fakestorage/server.go b/fakestorage/server.go index 852ee52abb..15e55675b7 100644 --- a/fakestorage/server.go +++ b/fakestorage/server.go @@ -196,6 +196,7 @@ func (s *Server) buildMuxer() { r.Path("/b/{bucketName}/o/{objectName:.+}/acl/{entity}").Methods("PUT").HandlerFunc(jsonToHTTPHandler(s.setObjectACL)) r.Path("/b/{bucketName}/o/{objectName:.+}").Methods("GET").HandlerFunc(s.getObject) r.Path("/b/{bucketName}/o/{objectName:.+}").Methods("DELETE").HandlerFunc(jsonToHTTPHandler(s.deleteObject)) + r.Path("/b/{sourceBucket}/o/{sourceObject:.+}/copyTo/b/{destinationBucket}/o/{destinationObject:.+}").HandlerFunc(jsonToHTTPHandler(s.rewriteObject)) r.Path("/b/{sourceBucket}/o/{sourceObject:.+}/rewriteTo/b/{destinationBucket}/o/{destinationObject:.+}").HandlerFunc(jsonToHTTPHandler(s.rewriteObject)) }