1
我想在谷歌添加新的文件夾,驅動 我用這個代碼類型application/vnd.google-apps.folder的文件:你不能上傳內容到
Google.Apis.Drive.v2.Data.File body = new Google.Apis.Drive.v2.Data.File();
body.Title = "title";
body.Description = "description";
body.MimeType = "application/vnd.google-apps.folder";
byte[] byteArray = Encoding.ASCII.GetBytes(content);
System.IO.MemoryStream stream = new System.IO.MemoryStream(byteArray);
Google.Apis.Drive.v2.FilesResource.InsertMediaUpload request =
service.Files.Insert(body, stream, mimeType);
Google.Apis.Drive.v2.Data.File parentFolder = request.Upload();
與代碼行: request.Upload()
我收到此錯誤:你不能上傳到類型application/vnd.google-apps.folder的文件內容