首页 文章

App Maker - Drive Picker小部件 - 如果嵌入Google Site中,则为空白对话框

提问于
浏览
0

我们正在使用Drive Picker小部件来选择用户Drive中的文件 .

该应用程序配置为以用户身份运行 .

https://scripts.google.com/ ... URL运行时,该应用程序正常工作;如果我们将应用嵌入新的Google协作平台实例(google.com网址),则驱动器选择器仅显示空的白色对话框 .

我们在Chrome的控制台中有一些错误:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://docs.google.com') does not match the recipient window's origin [...]

Invalid 'X-Frame-Options' header encountered when loading [...] 'ALLOW-FROM https://script.google.com' is not a recognized directive. The header will be ignored.

Uncaught Error: Incorrect origin value. Please set it to - (window.location.protocol + '//' + window.location.host) of the top-most page at new JJ (13808338-picker_modularized_opc.js:975) at _createPicker (13808338-picker_modularized_opc.js:977) at HTMLDocument.

Firefox说

Load denied by X-Frame-Options: https://script.google.com/ does not permit framing by https://sites.google.com/s/[...]/edit?authuser=0.

我们无法找到有关Drive Picker文档中的限制和限制的任何线索 .

谢谢 .

1 回答

  • 1

    我在我的裸域上运行app maker并让picker widget工作 .

    • 在应用程序设置中:选中允许嵌入应用程序

    • 在驱动器选择器的onPickerInit中: pickerBuilder.setOrigin("https://example.com/");

    如果这不适合你,请告诉我,我会研究我可能做的其他事情 .

相关问题