-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Unable to upload to onedrive/sharepoint #2145
Comments
Proof that this should be possible, or your docs are out of date... |
more so, the documents on https://learn.microsoft.com/en-us/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http only shows how to do plaintext instead of bytes array which is way more useful. Why not show byte array examples? that would work with anything. |
It is actually worse than expected. Even the directions from the docs do not work in msgraph for creating an upload session via: https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0 |
I found a way to do this via a stream and trial/error with odata method.... still need to allow GraphServiceClient to do this:
|
using Microsoft.Graph;
using Microsoft.Graph.Models;
GraphServiceClient gs = new(blahblah);
var drive = await gs.Users[""].Drive.PutAsync() is missing!
Microsoft Graph is version 5.28.0 via nuget...
Why can't we just use REST calls via HttpClient instead of this GraphServiceClient mess that is always out of date and never has everything working? REST calls you can make work no matter what. Relying on an object that never is updated when changes happen is bad practice.
2 answers are acceptable here:
1: fix it....
2: give a way to do REST instead of forcing everyone to use GraphServiceClient.
The text was updated successfully, but these errors were encountered: