Reputation: 2657
Similarly to GIT, is it possible to upload changes to a file, only, instead of uploading the entire new file?
I wish to do this within C#.
I've tried searching for a solution, but haven't had luck.
Upvotes: 1
Views: 162
Reputation: 1
Yes, you can!!! This example I'm using for spreadsheets:
string fileID = "CHANGE_TO_FILE_ID";
var stream = new System.IO.FileStream(openFile.FileName, System.IO.FileMode.Open)
var driveFile = new Google.Apis.Drive.v3.Data.File();
FilesResource.UpdateMediaUpload requestUpdate;
requestUpdate = service.Files.Update(driveFile, fileID, stream, GetMimeType(openFile.FileName));
requestUpdate.Fields = "id";
requestUpdate.Upload();
var retornoUpdate = requestUpdate.ResponseBody;
Console.WriteLine("FILE: " + retornoUpdate.Id);
Upvotes: 0
Reputation: 22306
No you can't. The only exception is if it's a spreadsheet you can update individual cells using the Sheets API.
Upvotes: 1