From 9ddad4a1a991f36185be9e1329b43cd57d0e4388 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 2 Oct 2015 14:57:39 -0400 Subject: [PATCH] client-side join chunks for GCS Boto does not implement GCS's custom multipart API and so we're left to join them client-side until it does. --- storage/cloud.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/storage/cloud.py b/storage/cloud.py index 2e90c05d1..c1de05ad8 100644 --- a/storage/cloud.py +++ b/storage/cloud.py @@ -471,6 +471,15 @@ class GoogleCloudStorage(_CloudStorage): return key.size + def complete_chunked_upload(self, uuid, final_path, storage_metadata): + self._initialize_cloud_conn() + + # Boto does not support GCS's multipart upload API because it differs from S3, so + # we are forced to join it all locally and then reupload. + # See https://github.com/boto/boto/issues/3355 + chunk_list = self._chunk_list_from_metadata(storage_metadata) + self._client_side_chunk_join(final_path, chunk_list) + class RadosGWStorage(_CloudStorage): def __init__(self, hostname, is_secure, storage_path, access_key, secret_key, bucket_name):