diff --git a/api/src/main/java/io/minio/PutObjectArgs.java b/api/src/main/java/io/minio/PutObjectArgs.java index db41ddbba..0db43e844 100644 --- a/api/src/main/java/io/minio/PutObjectArgs.java +++ b/api/src/main/java/io/minio/PutObjectArgs.java @@ -98,7 +98,7 @@ private long[] partInfo(long objectSize, long partSize) { } long partCount = (long) Math.ceil((double) objectSize / partSize); - return new long[] {partSize, partCount}; + return new long[] {partSize, partCount == 0 ? 1 : partCount}; } double pSize = Math.ceil((double) objectSize / MAX_MULTIPART_COUNT);