Skip to content

Commit fb00fac

Browse files
committed
#211 fix ChunkedUpload limit
1 parent 348d9dd commit fb00fac

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/com/microsoft/graph/concurrency/ChunkedUploadProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class ChunkedUploadProvider<UploadType> {
8282
/**
8383
* The stream size
8484
*/
85-
private final int streamSize;
85+
private final Long streamSize;
8686

8787
/**
8888
* The upload response handler
@@ -106,7 +106,7 @@ public class ChunkedUploadProvider<UploadType> {
106106
public ChunkedUploadProvider(final UploadSession uploadSession,
107107
final IGraphServiceClient client,
108108
final InputStream inputStream,
109-
final int streamSize,
109+
final Long streamSize,
110110
final Class<UploadType> uploadTypeClass) {
111111
if (uploadSession == null) {
112112
throw new InvalidParameterException("Upload session is null.");

src/main/java/com/microsoft/graph/requests/extensions/ChunkedUploadRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public ChunkedUploadRequest(final String requestUrl,
7272
final int chunkSize,
7373
final int maxRetry,
7474
final int beginIndex,
75-
final int totalLength) {
75+
final Long totalLength) {
7676
this.data = new byte[chunkSize];
7777
System.arraycopy(chunk, 0, this.data, 0, chunkSize);
7878
this.retryCount = 0;

src/test/java/com/microsoft/graph/functional/OneDriveTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void testLargeFileUpload() throws IOException, InterruptedException {
3737

3838
//Get resource file from file system
3939
InputStream uploadFile = OneDriveTests.class.getClassLoader().getResourceAsStream("hamilton.jpg");
40-
int fileSize = uploadFile.available();
40+
Long fileSize = (long) uploadFile.available();
4141

4242
IProgressCallback<DriveItem> callback = new IProgressCallback<DriveItem> () {
4343
@Override

0 commit comments

Comments
 (0)