如何在网站中嵌入 Google Drive 文件夹

How to embed a Google Drive folder in a website(如何在网站中嵌入 Google Drive 文件夹)
本文介绍了如何在网站中嵌入 Google Drive 文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站中嵌入 Google 云端硬盘中的一个文件夹.我找不到嵌入代码或 Google 云端硬盘帮助文章中记录的任何内容.

I have a folder in Google Drive that I'd like to embed in my website. I can't find an embed code or anything documented in Google Drive Help articles.

推荐答案

Google Drive 文件夹可以嵌入并显示在 listgrid 视图中:

Google Drive folders can be embedded and displayed in list and grid views:

<iframe src="https://drive.google.com/embeddedfolderview?id=FOLDER-ID#list" style="width:100%; height:600px; border:0;"></iframe>


<iframe src="https://drive.google.com/embeddedfolderview?id=FOLDER-ID#grid" style="width:100%; height:600px; border:0;"></iframe>



:什么是文件夹ID(FOLDER-ID),如何获取?



Q: What is a folder ID (FOLDER-ID) and how can I get it?

A:转到 Google Drive >> 打开文件夹 >> 在浏览器的地址栏中查看其 URL.例如:

A: Go to Google Drive >> open the folder >> look at its URL in the address bar of your browser. For example:

文件夹网址:https://drive.google.com/驱动器/文件夹/0B1iqp0kGPjWsNDg5NWFlZjEtN2IwZC00NmZiLWE3MjktYTE2ZjZjNTZiMDY2

文件夹 ID:
0B1iqp0kGPjWsNDg5NWFlZjEtN2IwZC00NmZiLWE3MjktYTE2ZjZjNTZiMDY2

Folder ID:
0B1iqp0kGPjWsNDg5NWFlZjEtN2IwZC00NmZiLWE3MjktYTE2ZjZjNTZiMDY2

此技术最适用于具有公共访问权限的文件夹.仅与某些 Google 帐户共享的文件夹在您以这种方式嵌入时会造成麻烦.在进行此编辑时,会显示一条消息您需要权限",其中一些按钮可帮助您请求访问"或切换帐户"(或可能登录到 Google 帐户).这些按钮中的 Javascript 在 Chrome 中的 IFRAME 内无法正常工作.

This technique works best for folders with public access. Folders that are shared only with certain Google accounts will cause trouble when you embed them this way. At the time of this edit, a message "You need permission" appears, with some buttons to help you "Request access" or "Switch accounts" (or possibly sign-in to a Google account). The Javascript in these buttons doesn't work properly inside an IFRAME in Chrome.

在 https://productforums.google.com/forum 了解更多信息/#!msg/drive/GpVgCobPL2Y/_Xt7sMc1WzoJ

这篇关于如何在网站中嵌入 Google Drive 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

how to remove this error quot;Response must contain an array at quot; . quot;.quot; while making dropdown(如何删除此错误quot;响应必须在quot;处包含数组。创建下拉菜单时(Q;))
Why is it necessary to use `document.createElementNS` when adding `svg` tags to an HTML document via JS?(为什么在通过JS为一个HTML文档添加`svg`标签时,需要使用`Document.createElementNS`?)
wkhtmltopdf print-media-type uses @media print ONLY and ignores the rest(Wkhtmltopdf print-media-type仅使用@media print,而忽略其余内容)
price depend on selection of radio input(价格取决于无线电输入的选择)
calculate price depend on selection without button(根据没有按钮的选择计算价格)
What should I consider before minifying HTML?(在缩小HTML之前,我应该考虑什么?)