mirror of https://github.com/apache/jclouds.git
JCLOUDS-912: GCS upload InputStream work around
This commit is contained in:
parent
5d437312bf
commit
c2a22bc32c
|
@ -214,7 +214,9 @@ public final class GoogleCloudStorageBlobStore extends BaseBlobStore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String putBlob(String container, Blob blob, PutOptions options) {
|
public String putBlob(String container, Blob blob, PutOptions options) {
|
||||||
if (options.isMultipart()) {
|
if (options.isMultipart() || !blob.getPayload().isRepeatable()) {
|
||||||
|
// JCLOUDS-912 prevents using single-part uploads with InputStream payloads.
|
||||||
|
// Work around this with multi-part upload which buffers parts in-memory.
|
||||||
return putMultipartBlob(container, blob, options);
|
return putMultipartBlob(container, blob, options);
|
||||||
} else {
|
} else {
|
||||||
checkNotNull(blob.getPayload().getContentMetadata().getContentLength());
|
checkNotNull(blob.getPayload().getContentMetadata().getContentLength());
|
||||||
|
|
Loading…
Reference in New Issue