You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "suyanhanx (via GitHub)" <gi...@apache.org> on 2023/04/07 05:54:59 UTC

[GitHub] [incubator-opendal] suyanhanx commented on a diff in pull request #1869: feat(gcs): copy support for GCS

suyanhanx commented on code in PR #1869:
URL: https://github.com/apache/incubator-opendal/pull/1869#discussion_r1160455319


##########
core/src/services/gcs/backend.rs:
##########
@@ -405,6 +407,50 @@ impl Accessor for GcsBackend {
         ))
     }
 
+    async fn copy(&self, from: &str, to: &str, _: OpCopy) -> Result<RpCopy> {
+        let source = percent_encode_path(&build_abs_path(&self.root, from.trim_end_matches("/")));
+        let dest = percent_encode_path(&build_abs_path(&self.root, to.trim_end_matches("/")));
+        let req_uri = format!(
+            "{}/storage/v1/b/{}/o/{}/rewriteTo/b/{}/o/{}",

Review Comment:
   Is something not quite right here? I think it should be this:
   https://cloud.google.com/storage/docs/json_api/v1/objects/copy



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org