这就是我从Googledrive获取文件所做的工作,但我得到了GTLDriveFile的downloadUrl nil。我试过" exportLinks"也是,但那也是零。请建议。
#pragma mark- Downloading GDrive Files
-(void)downloadGDriveFiles:(GTLDriveFile *)file{
GTMHTTPFetcher *fetcher = [self.service.fetcherService fetcherWithURLString:file.downloadUrl];
[fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error)
{
if (error == nil)
{
NSLog(@"Retrieved file content");
}
else
{
[self showAlert:@"" message:@"Unable to download this file"];
}
}];
}
谢谢!