mirror of https://github.com/apache/jclouds.git
added message and null check guarding MPU on payloads with contentLength set
This commit is contained in:
parent
0502300840
commit
96a4923c4c
|
@ -92,7 +92,10 @@ public class SequentialMultipartUploadStrategy implements MultipartUploadStrateg
|
|||
String key = blob.getMetadata().getName();
|
||||
Payload payload = blob.getPayload();
|
||||
MultipartUploadSlicingAlgorithm algorithm = new MultipartUploadSlicingAlgorithm();
|
||||
algorithm.calculateChunkSize(payload.getContentMetadata().getContentLength());
|
||||
algorithm
|
||||
.calculateChunkSize(checkNotNull(
|
||||
payload.getContentMetadata().getContentLength(),
|
||||
"contentLength required on all uploads to amazon s3; please invoke payload.getContentMetadata().setContentLength(length) first"));
|
||||
int parts = algorithm.getParts();
|
||||
long chunkSize = algorithm.getChunkSize();
|
||||
if (parts > 0) {
|
||||
|
|
Loading…
Reference in New Issue