We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5cc9d1a + 761c7a4 commit 2c8f6f9Copy full SHA for 2c8f6f9
src/com/qiniu/resumableio/ResumableIO.java
@@ -63,7 +63,7 @@ public void onFailure(Exception ex) {
63
}
64
65
public int put(final String key, final InputStreamAt input, final PutExtra extra, final JSONObjectRet ret) {
66
- final int blkCount = (int) (input.length() / BLOCK_SIZE) + 1;
+ final int blkCount = (int) ((input.length() + BLOCK_SIZE - 1) / BLOCK_SIZE);
67
if (extra.processes == null) extra.processes = new PutRet[blkCount];
68
extra.totalSize = input.length();
69
final int[] success = new int[] {0};
0 commit comments