Skip to content
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

[v5.0.0] Small files upload returns a drive item, not nothing #1718

Closed
olivermue opened this issue Mar 13, 2023 · 2 comments · Fixed by #1809
Closed

[v5.0.0] Small files upload returns a drive item, not nothing #1718

olivermue opened this issue Mar 13, 2023 · 2 comments · Fixed by #1809

Comments

@olivermue
Copy link

olivermue commented Mar 13, 2023

Describe the bug
According to the documenation, this call

var driveItem = serviceClient.Drives["driveId"].Items["folderId"].ItemWithPath("SomeFilename.txt").Content.PutAsync(stream);

should return a drive item, but the current signature of the PutAsync() method is

public async Task PutAsync(Stream body, Action<ContentRequestBuilderPutRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default)

Expected behavior
Please change the signature of the method to be Task<DriveItem> instead of Task.

@andrueastman
Copy link
Member

Dependent on microsoft/OpenAPI.NET.OData#357

@asgeirgs
Copy link

Evidently you need to make a second call to retrieve the DriveItem as such:

var driveItem = await serviceClient.Drives["driveId"].Items["folderId"].ItemWithPath("SomeFilename.txt").GetAsync();

@ghost ghost locked as resolved and limited conversation to collaborators May 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants