I have installed the Graph API v5 using c# and I am trying to follow the below examples of uploading a file to sharepoint. Seems like some of the methods do not exist anymore in the graph API v5.
1st code doesnt recognise Items
var uploadSession = await graphClient.Drive.Items["itemId"].ItemWithPath("SWEBOK.pdf").CreateUploadSession().Request().PostAsync();
doesnt recognise Root
var uploadedFile = client.Me.Drive.Root
.ItemWithPath("smallfile.txt")
.Content
.Request()
.PutAsync<DriveItem>(fileStream)
.Result;
Anyone can refer me to documentation of how to upload using graph api v5.
Is it better to use a older version of Graph API instead of the version 5. Also is it better to use http client call instead of using the SDK libraries. Thanks