【发布时间】:2016-05-20 14:52:47
【问题描述】:
要使用 google Drive,Google 开发者门户网站表示
https://developers.google.com/drive/ios/devguide/files#reading_files
1
NSString *url = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?alt=media",file.identifier];
这是我的普通文档/文本文件的网址和
2
NSString *url = [NSString stringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@/export?alt=media&mimeType=application/pdf", file.identifier];
这是我的 pdf 文件网址.. 但是没有一个网址适合我
我现在来到#1,如果我将我的 url 替换为 kClientID 为
NSString *url = [NSStringstringWithFormat:@"https://www.googleapis.com/drive/v3/files/%@?key=%@", file.identifier,kClientID];
它适用于普通文本/文档文件……。但不确定如何访问 PDF 文件 url。
【问题讨论】:
-
无法理解您的问题...!!你到底想要什么??????
-
@Lion,我无法从谷歌驱动器下载 pdf 文件
-
您尝试下载文件的代码在哪里?您只需添加三个包含 url 的字符串!
-
根据谷歌文档的第二个,但它对我不起作用:(不知道我犯了什么错误
标签: ios objective-c pdf