我们收到以下错误:
未找到Google.Apis.Requests.RequestError文件:1l6lKqzMgq7IsoyKg-pZoaFqWrTGRAG8i。 [404]错误消息[找不到文件:1l6lKqzMgq7IsoyKg-pZoaFqWrTGRAG8i。]位置[fileId - 参数]原因[notFound]域[global]“}
错误指出项目的位置(父级)不存在,但ID是由驱动器API生成的。 可能是什么原因?
更新
代码:
body.Parents = new List<string>() { item.Location };
using (var stream = new System.IO.FileStream(item.FilePath,
System.IO.FileMode.Open,
System.IO.FileAccess.Read))
{
try
{
Google.Apis.Upload.IUploadProgress IU;
fileRequest = driveService.Files.Create(body,
stream, GetMimeType(item.FilePath));
//fileRequest.ChunkSize = 256 * 1024 * 20;
//fileRequest.ResponseReceived +=
Request_ResponseReceived;
//fileRequest.ProgressChanged +=
Request_ProgressChanged;
fileRequest.UploadSessionData +=
Request_UploadSessionData;
item.ResumeRetriesCount = 0;
ProgressPercent = 0;
FileSize = new FileInfo(item.FilePath).Length;
Uri uploadUri = GetSessionRestartUri();
if (uploadUri == null)
{
fileRequest.ProgressChanged += (o) =>
{
}
}.....