i have a question regrading Google Drive API and editing my uploaded files. I have uploaded na excel file to google drive with a service account in Asp.Net Core C# and shared it with my private google account. Here is my code:
FilesResource.InsertMediaUpload request = service.Files.Insert(body, stream, _GetDriveMimeType(fileToUpload));
var progress = request.Upload();
File file = request.ResponseBody;
Permission newPermission = new Permission();
newPermission.EmailAddress = "[email protected]";
newPermission.Value = "[email protected]";
newPermission.Type = "user";
newPermission.Role = "writer";
PermissionsResource.InsertRequest insertRequest = service.Permissions.Insert(newPermission, file.Id);
insertRequest.SendNotificationEmails = false;
insertRequest.Execute();
return file;
When i open the file with the "AlternateLink" which i get from the file, and i am editing the file with my private google account, i want that the changes are synced back to the original shared document.
In my case it is saving the changes to a new file in the "My drive" section and didn't sync it back to the base file.
Can anyone help me please?
Regards, Andreas