Use Iterable payload slicer for GCS

Payload slicer has a method that returns an iterable of payloads that
works on non-repeatable InputStreams that was introduced to fix
multi-part uploads in Swift (JCLOUDS-356). This commit applies the
same method to fix multi-part uploads for GCS blob store.
This commit is contained in:
Andrew Gaul 2015-01-16 11:54:45 -08:00
parent a21d3fb2d6
commit 4d7f11617e
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public final class SequentialMultipartUploadStrategy extends MultipartUploadStra
.contentLength(partSize).contentType(blob.getMetadata().getContentMetadata().getContentType()) .contentLength(partSize).contentType(blob.getMetadata().getContentMetadata().getContentType())
.build(); .build();
GoogleCloudStorageObject object = api.getObjectApi().multipartUpload(container, GoogleCloudStorageObject object = api.getObjectApi().multipartUpload(container,
blob2ObjectTemplate.apply(blobPart.getMetadata()), blobPart.getPayload()); blob2ObjectTemplate.apply(blobPart.getMetadata()), part);
sourceList.add(object); sourceList.add(object);
} }
ComposeObjectTemplate template = ComposeObjectTemplate.create(sourceList, destination); ComposeObjectTemplate template = ComposeObjectTemplate.create(sourceList, destination);