我的驱动器中有一个具有“公共”可见性的文件。我使用驱动器 api 的示例页面中的代码(如下)来检索文件内容。文件元数据显示我的文件在那里。但是 hhtp 响应告诉我它不存在(远程服务器返回错误:(404)未找到。)。(哦顺便说一下文件是由具有“所有者”权限的用户上传的,现在我试图检索具有“作者”权限的不同用户的相同文件。)有什么想法吗?
    public static System.IO.Stream DownloadFile(
     IAuthenticator authenticator, Google.Apis.Drive.v2.Data.File file)
    {
        if (!String.IsNullOrEmpty(file.DownloadUrl))
        {
            try
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri(file.DownloadUrl));
                authenticator.ApplyAuthenticationToRequest(request);
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                if (response.StatusCode == HttpStatusCode.OK)
                {
                    return response.GetResponseStream();
                }
                else
                {
                    Console.WriteLine(
                        "An error occurred: " + response.StatusDescription);
                    return null;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: " + e.Message);
                return null;
            }
        }
        else
        {
            // The file doesn't have any content stored on Drive.
            return null;
        }
    }