我无法在API文档或其他地方找到答案.我在文档中看到你可以获得一个文件的downloadURL,但它将它称为"短暂的URL".那是什么意思?
我需要上传图片并获取该图片的永久网址,该网址是直接网址,而不是嵌入到电子邮件或网络文档中等等.这可能吗?
谢谢
我正在开发一个Android项目,我正在尝试使用Google Drive API并且我已经完成了大部分工作,但我在如何执行下载时遇到了问题.
我无法在任何地方找到我如何获取文件ID以便我可以执行下载.为了测试我检索到的所有文件在我的硬盘帐户,并将它们添加到列表数组,然后拿到ID列表中的第一个文件.
然后我将文件ID复制到命令下载文件,这成功地工作但我不知道如何获取我想下载的特定文件的文件ID.
下面是我用来下载文件的代码.
private void downloadFile()
{
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try
{
com.google.api.services.drive.model.File file = service.files().get("0B-Iak7O9SfIpYk9zTjZvY2xreVU").execute();
//FileList file = service.files().list().execute();
//List<com.google.api.services.drive.model.File> fileList = file.getItems();
//com.google.api.services.drive.model.File fileItem = fileList.get(0);
//Log.d("FileID" , fileItem.getId());
//Log.d("Count", "Retreived file list");
if (file.getDownloadUrl() != null && file.getDownloadUrl().length() > 0)
{
HttpResponse resp = service.getRequestFactory().buildGetRequest(new GenericUrl(file.getDownloadUrl())).execute();
InputStream inputStream = resp.getContent();
writeToFile(inputStream);
}
}
catch (IOException e)
{
Log.e("WriteToFile", e.toString());
e.printStackTrace();
}
}
});
thread.start();
} …Run Code Online (Sandbox Code Playgroud) 我想在使用Pelican创建的博客上放置外部图像
所以我尝试:
some text
.. image:: http://example.com/image.png
:alt: Alt text
Run Code Online (Sandbox Code Playgroud)
运行“ pelican -s pelicanconf.py”后,出现错误:
ERROR: Better Fig. Error: image not found: /Users/kendriu/sources/pelican-blog/contenthttp:/example.com/image.png
ERROR: Could not process ./4_joe.rst
| [Errno 2] No such file or directory: u'/Users/kendriu/sources/pelican-blog/contenthttp:/example.com/image.png'
Run Code Online (Sandbox Code Playgroud)
而且我的帖子中没有图片。
问题是:如何在我的博客中放置外部图像。
我正在使用谷歌驱动器在网站上显示图像。我使用以下网址来显示图像:
https://drive.google.com/uc?export=view&id={fileId}
Run Code Online (Sandbox Code Playgroud)
它在大多数情况下工作正常,但有些用户看不到图像并收到以下错误消息:
Failed to load resource: the server responded with a status of 403 ()
Run Code Online (Sandbox Code Playgroud)
谷歌驱动器上的图像文件和文件夹与每个人共享,并有一个链接可供查看。该问题似乎与浏览器无关。
有人知道如何解决这个问题吗?是否有一些我忘记做的事情(我是否需要链接中的某种 API 密钥)?
我有一个我正在设计的网站,我想使用谷歌驱动器中的文件夹来存储图像.问题是我似乎无法找到如何获取这些图像的URL.实际使用此功能需要具有google文件夹权限的任何人都可以放入图像,并在加载页面时显示.
我有PHP循环计算出来,我只是缩短了路径<img src="" >.
目前,即使从谷歌驱动器静态获取一个图像也将是一个开始.只是因为我知道它可以做到.谷歌搜索没有任何好结果,我开始怀疑这甚至是可能的.我是在叫错树还是有办法做到这一点.提前致谢.
我的Google云端硬盘中有一个文件夹,我放了数百个产品图片.
我想知道我是否可以编写一个找到该文件的脚本,然后返回该文件的图像URL,以便可以从我创建的Google Web App中查看该文件?