mirror of https://github.com/apache/jclouds.git
Handle multiple of MAX_BLOCK_SIZE for Azure MPU
Currently files are not properly uploaded if they are a multiple of MAX_BLOCK_SIZE. Fixes JCLOUDS-233.
This commit is contained in:
parent
faecd45a01
commit
8dfb894007
|
@ -70,7 +70,7 @@ public class AzureBlobBlockUploadStrategy implements MultipartUploadStrategy {
|
|||
while (offset < length) {
|
||||
blockCount++;
|
||||
long chunkSize = MAX_BLOCK_SIZE;
|
||||
if (blockCount >= totalBlocks) {
|
||||
if (length - offset < MAX_BLOCK_SIZE) {
|
||||
chunkSize = length % MAX_BLOCK_SIZE;
|
||||
}
|
||||
bytesWritten += chunkSize;
|
||||
|
|
Loading…
Reference in New Issue