cuichenli commented on code in PR #1801:
URL: 
https://github.com/apache/incubator-opendal/pull/1801#discussion_r1152790233


##########
core/src/services/gcs/backend.rs:
##########
@@ -625,6 +641,85 @@ impl GcsBackend {
 
         self.client.send_async(req).await
     }
+
+    async fn gcs_initiate_multipart_upload(
+        &self,
+        path: &str,
+    ) -> Result<Response<IncomingAsyncBody>> {
+        let p = build_abs_path(&self.root, path);
+        let url = format!("{}/{}/{}?uploads", self.endpoint, self.bucket, p);
+        let mut req = Request::post(&url)
+            .body(AsyncBody::Empty)
+            .map_err(new_request_build_error)?;
+        self.signer.sign(&mut req).map_err(new_request_sign_error)?;
+        self.client.send_async(req).await
+    }
+
+    pub fn gcs_upload_part_request(
+        &self,
+        path: &str,
+        upload_id: &str,
+        part_number: usize,
+        size: Option<u64>,
+        body: AsyncBody,
+    ) -> Result<Request<AsyncBody>> {
+        let p = build_abs_path(&self.root, path);
+        let url = format!(
+            "{}/{}/{}?partNumber={}&uploadId={}",

Review Comment:
   Sorry can you elaborate about why XML API can not be used here? I have 
tested locally and looks like it is working correctly. Thanks.
   
   By testing locally I mean invoking the newly added methods to finish one 
multipart upload.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to