Reputation: 5547
I am trying to use the sample code from https://developers.google.com/drive/v2/reference/files/insert#examples. In particular:
FilesResource.InsertRequest request = service.Files.Insert(body);
request.Upload(stream, mimeType);
It turned out that the Upload
method doesn't exist in the FilesResource.InsertRequest class. I was reviewing and it just looks like the class is missing the method.
Maybe it is not implemented in the released .NET library?
Thanks.
Upvotes: 2
Views: 986
Reputation: 15004
Unfortunately some recent changes to the .NET client library affected this part, I'll make sure the documentation is updated accordingly.
The library now supports the resumable upload mechanism but you have to use the InsertMediaUpload class instead:
FilesResource.InsertMediaUpload request = service.Files.Insert(body, stream, mimeType);
request.Upload();
For a complete reference, please check the updated DrEdit.NET sample:
https://code.google.com/p/google-drive-sdk-samples/source/browse/dotnet/DrEdit/Models/Utils.cs#290
Upvotes: 2