Skip to content

When downoading from sharepoint with buffer size always getting maximum 8K buffer and not as we asked #2269

@ihudedi

Description

@ihudedi

Describe the bug

When downloading file from sharepoint using graph api and set the buffer size to be downloaded only 8K ( maximum) is fetched ) instread of the given buffer size.
InputStream inputStream = graphServiceClient.drives().byDriveId(driveId).items().byDriveItemId(getDriveItemIdFromRootPath(filePath)).content().get();
byte[] buf = new byte[cloudPartSizeWhenDownloadingToLocal];
int bytesRead;
while ((bytesRead = srcInputStream.read(buf)) != -1) {
byresRead is always maximum 8K and not per demand
}

Expected behavior

The bytess returned from this method should aline with the request.

How to reproduce

see above

SDK Version

6.25.1

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions