如何在网站上显示来自Google云端硬盘的图片? [英] How do I display images from Google Drive on a website?

查看:725
本文介绍了如何在网站上显示来自Google云端硬盘的图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一位客户已将一些照片上传到他们的 Google云端硬盘

a>并希望我在其公司网站上展示他们的照片。我查看了文档,以便在网页中显示Google云端硬盘内容,但看起来这样只是在网页中显示内容的指示,它已经做到了。



我的问题是,如何直接在客户的网页上显示内容?



谢谢。

解决方案

将它们上传到您的Google云端硬盘上的公共文件夹,从地址栏复制其文件夹ID (例如 0B0Gi4v5omoZUVXhCT2kta1l0ZG8 )并将其粘贴到表单中在 GDrives 上,然后选择你自己的别名(例如 myimgs ),瞧!您可以使用例如一张一张地访问图像。 http://gdriv.es/myimgs/myimage.jpg



如果要在网站上嵌入整个文件夹(在框架中),可以使用以下URL之一,用您自己的ID替换[folderID]:





如果您希望以XML或JSON格式获取文件列表,您可以使用 YQL



注意:您可以使用 Google+照片主持并嵌入图片还有。

A client of mine has uploaded some photos to their Google Drive and would like me to display their photos on their company website. I reviewed the documentation for displaying Google Drive content in a web page, but it appears that this is simply the instructions for displaying the contents in a web page, which it already does.

My question is, how do I display the contents directly on the client's web page?

Thanks.

解决方案

If you have some image files, just upload them to a public folder on your Google Drive, copy its folder ID from the address bar (e.g. 0B0Gi4v5omoZUVXhCT2kta1l0ZG8) and paste it into a form at GDrives, then choose your own alias (e.g. myimgs) and voila! You can access the images one by one using e.g. http://gdriv.es/myimgs/myimage.jpg.

If you want to embed a whole folder on your website (in a frame), you can use one of the following URLs, replacing [folderID] with your own ID:

If you prefer to get the file list in XML or JSON, you can use YQL.

Note: You can use Google+ Photos to host ans embed your images as well.

这篇关于如何在网站上显示来自Google云端硬盘的图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆