Skip to content

Commit

Permalink
Merge pull request #39 from imandra-ai/b/fix-rewrite-bug
Browse files Browse the repository at this point in the history
Fix bugs in wrapper around gcloud `rewrite`
  • Loading branch information
benbellick authored Dec 18, 2024
2 parents d3995c0 + fc3ed55 commit d01d815
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/storage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type rewrite_object_response = {
kind : string;
total_bytes_rewritten : string; [@key "totalBytesRewritten"]
object_size : string; [@key "objectSize"]
done_ : bool;
done_ : bool; [@key "done"]
rewrite_token : string option; [@key "rewriteToken"] [@default None]
resource : Yojson.Safe.t option; [@default None]
}
Expand All @@ -111,6 +111,8 @@ let rewrite_object source_bucket source_object destination_bucket
Lwt.catch
(fun () ->
let uri =
let source_object = Uri.pct_encode source_object in
let destination_object = Uri.pct_encode destination_object in
Uri.make () ~scheme:"https" ~host:"storage.googleapis.com"
~path:
(Printf.sprintf "storage/v1/b/%s/o/%s/rewriteTo/b/%s/o/%s"
Expand Down

0 comments on commit d01d815

Please sign in to comment.