0

Can anyone help to get C#.NET code to upload large files into SharePoint using Graph API.

Thank you and regards, Rakesh

Rakeshnb01
  • 1
  • 1
  • 2
  • I found https://stackoverflow.com/questions/49776955/how-to-upload-a-large-document-in-c-sharp-using-the-microsoft-graph-api-rest-cal/59776567#59776567 but in that LargeFileUpload class definition is not given. If anyone know this please share. – Rakeshnb01 Mar 25 '22 at 10:51

2 Answers2

0

The answer in the linked question shows how to use the LargeFileUpload class that comes as part of the Microsoft Graph C# SDK.

You do not need to implement the class yourself.

This link shows the C# code needed to use the SDK classes/functionality

KennetRunner
  • 287
  • 1
  • 12
0

Try with this:

 DriveItem file = await graphClient
  .Sites["IdSite"]
  .Drives["Id"]
  .Items["IdDrive"]]
  .ItemWithPath("nameFile")
  .Content
  .Request()
  .PutAsync<DriveItem>(stream);
sergiokml
  • 41
  • 6