问题标签 [google-picker]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
302 浏览

google-drive-api - 使用 Google Picker 上传时更改共享设置?

使用 Google Picker 将文件上传到 google 时,我正在尝试更改共享权限。这甚至可能吗,还是我需要编写自己的方法来在上传后更改权限?

使用谷歌选择器正常上传是可行的,但我想让上传的文件“公开”。现在它们默认为“私有”。

提前致谢!

0 投票
0 回答
44 浏览

javascript - 其他函数如何返回ID?

其他函数如何返回ID?

0 投票
0 回答
293 浏览

meteor - Integrate Google Picker with MeteorJS

I am trying to use Google Picker within a Meteor application. I am not an expert, I just followed the example on Google Picker API page https://developers.google.com/picker/docs/index but could not make it work.

Here is what I tried in the client side and of course I changed the devKey and Client ID:

Then on the template:

0 投票
0 回答
136 浏览

javascript - 网站上的 Google Drive Picker

我想在网站上集成 Google Drive Picker。我在 Google Developer Console 和所有必需的 ID 和密钥上创建了项目,我的问题是如何在 javascript 代码中保护这些凭据?我认为客户端 id 和 api 密钥应该始终受到保护,或者我应该在这里不用担心?

0 投票
1 回答
2417 浏览

javascript - 如何下载我从 Google Picker API 中选择的文件?

我正在 PHP 站点中实现 Google Picker。我可以从 Google Picker API 获取文件 ID,也可以使用 JavaScript 下载文件。以下是我在 setCallback(pickerCallback) 函数中调用的回调函数。

我可以将文件 ID 传递给 PHP,但要下载文件,我必须再次进行身份验证。任何人都可以帮助如何在 PHP 中进行文件下载吗?

Google Developers 页面中有一个管理下载帮助,但它不适用于我https://developers.google.com/drive/web/manage-downloads

发现了一个与此类似的问题,但没有回答如何在从 google picker 选择文件后立即在后端下载文件中下载文件。

0 投票
2 回答
746 浏览

javascript - 已保存用户名和密码的 Google Picker API

我已经实现Google Picker API了它会弹出一个窗口询问Google authentication,然后向我们展示 Google Drive 中所有可用的文件。一切正常。

但现在我的要求是,我需要访问驱动器中的文件,而无需弹出身份验证。我将用户名和密码保存在我的数据库中。

有什么方法可以传递用户凭据并获得授权和访问文件?

我的代码:

0 投票
0 回答
349 浏览

google-apps-script - Pop out Google Picker from IFRAME in Google Sites Apps Script Gadget?

So I made this google apps script to use the google picker on my google sites webpage. The apps script is inserted into the webpage via the google apps script gadget. This all functions as I intended, however, it does not behave the way I'd like it to or expected. Everything is rendered inside the requisite IFRAME. And from what I can find and tried, this has to be the case (please correct me if I'm wrong). This requires me to provide the screen real estate to show the picker even when it's not visible - which is pretty poor design. Does anyone know a way around this? That is, to make the picker modal to or pop out of the IFRAME instead stuck inside it?

0 投票
0 回答
546 浏览

google-drive-api - Google Picker DocsUploadView.setIncludeFolders(true) 排序顺序?

我正在使用 Google Picker 将文件上传到我的云端硬盘,为方便起见,我也在使用该DocsUploadView.setIncludeFolders(true)选项。这一切都很好,除了在目标文件夹选择器组合框小部件中,所有文件夹都以我无法弄清楚的随机顺序排列(见下图)。我期待按字母顺序排列。我似乎在 Google Picker API 参考中找不到排序选项。那么,我是否遗漏了什么,或者这是一个错误或缺失的功能?

在此处输入图像描述

0 投票
4 回答
5307 浏览

javascript - Google API 错误,但仍然有效

连接到 google drive API 时,我在本地主机上收到此控制台错误,但我在脚本中配置的选择器成功显示了我的驱动器的内容:

无法在“DOMWindow”上执行“postMessage”:提供的目标来源(“ https://docs.google.com ”)与收件人窗口的来源(“ http://localhost:8000 ”)不匹配。

加载“ https://docs.google.com/picker?protocol=gadgets&origin=http%3A%2F%2Flocalho …2photos%22))&rpctoken=yxxydsx40r21&rpcService=2dngvfb4tj9x&thirdParty=true时遇到无效的“X-Frame-Options”标头: 'ALLOW-FROM http://localhost:8000 ' 不是公认的指令。标题将被忽略。

我会忽略这一点,还是会给我带来麻烦?

0 投票
1 回答
922 浏览

google-picker - Image direct link from Google Picker

I have Google Picker working well in my project, it imports all data, thumbnails, id etc. of the file. In next step I have to download it, but I don't have direct link. I tried to get direct link with Drive V2 API, but it show 404 error. I have all file data, how could I get the direct link?

Thanks for answer.

EDIT: Drive REST API returns 404 after receiving file ID from Google Picker.