0

Can anyone help me how to upload large file (more than 1 GB) to Google drive with google drive v2 api using resumable upload with my c# application

using (var stream = new System.IO.FileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read)) 
{ 
    try { 
        FilesResource.InsertMediaUpload InsertMediaUploadrequest = m_DestiDriveService.Files.Insert(fileBody, stream, p_FileItem.MimeType); 
        IUploadProgress uploadProgress =InsertMediaUploadrequest.Upload(); } 
Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • Please show us what you have tried and describe any issues you are having with your current solution. – Linda Lawton - DaImTo May 11 '17 at 07:21
  • using (var stream = new System.IO.FileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read)) { try { FilesResource.InsertMediaUpload InsertMediaUploadrequest = m_DestiDriveService.Files.Insert(fileBody, stream, p_FileItem.MimeType); IUploadProgress uploadProgress =InsertMediaUploadrequest.Upload(); } – Vijina Govindan May 11 '17 at 07:33
  • i tried it with normal upload but it will be convenient to use resumable upload in case of large file. – Vijina Govindan May 11 '17 at 07:34
  • I am not getting how to implement this resumable upload – Vijina Govindan May 11 '17 at 07:34
  • This is the only sample code i know of for C# and reusable upload its for YouTube you will have to alter it for drive. https://github.com/google/google-api-dotnet-client-samples/blob/master/ResumableUpload.CS.Sample/ResumeableUploadSample.cs – Linda Lawton - DaImTo May 11 '17 at 07:46

0 Answers0