How to download a file from Google Drive

前端 未结 2 1608
一整个雨季
一整个雨季 2021-02-06 12:43

I am currently trying to make an application that downloads files from Google Drive.

In the Google Drive SDK documentation I found an example method that should return a

2条回答
  •  名媛妹妹
    2021-02-06 13:10

    Might be late but I just downloaded from Google Drive using the following code:

    var stream = service.HttpClient.GetStreamAsync(downloadUrl);
            var result = stream.Result;
            using (var fileStream = System.IO.File.Create(filePath))
            {
                result.CopyTo(fileStream);
            }
    

提交回复
热议问题