question

BradleyPlett-8862 avatar image
0 Votes"
BradleyPlett-8862 asked saldana-msft edited

Graph DriveItem Content Stream?

I want to be able to download a large file using Graph. To do so, I need to "chunk" the file, because it's too large to fit into the memory available. Unfortunately the only call I know reads the entire file into memory immediately. Is there a way to avoid this? What call should I be using?

The call I'm using is:
graphClient.Drives[driveId].Items[itemId].Content.Request().GetAsync()
I want to use "CopyToAsync" with a buffer size to send this stream to my response stream, but it blows up on a memory exception before I can.

Any help would be much appreciated!

P.S. Why are there no tags for "Graph.Drives"?!?

microsoft-graph-sdkmicrosoft-graph-files
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers