向Google云端硬盘添加菜单 [英] Add a menu to Google Drive

查看:104
本文介绍了向Google云端硬盘添加菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按我的要求进行的项目中,当我与Google云端硬盘中的某人共享文件/文件夹时,我应该能够为其附加一个日期,并且一旦该日期过去,他们就不能查看文件/文件夹.

I'm working on a project where my requirement is, when I share a file/folder to someone from Google Drive I should be able to attach a date to it, and once the date has passed they should not be able to view the file/folder.

搜索时,我偶然发现了 http://ctrlq.org /code/19376-change-folder-permissions-google-script

When I was searching I stumbled upon http://ctrlq.org/code/19376-change-folder-permissions-google-script

我的问题: 有没有办法我可以在Google云端硬盘本身上激活此脚本,即 选中文件后,我需要在更多选项菜单下有一个菜单项"Sharing Expires On",并且应该可以在其中添加日期.

My questions: Is there a way I can activate this script on Google Drive itself, i.e. When a file is checked, I need a menu item saying 'Sharing Expires On' under the more options menu, and I should be able to add a date to it.

请引导我完成这个过程.

Please guide me through this.

推荐答案

是的,它是非常新的和先进的(而且很简洁),但总的来说,您将:

Yes, it's quite new and advanced (and neat) but in a nutshell you would:

  1. 使用DriveApp编写Apps脚本并将其发布为网络应用.
  2. 在开发人员控制台上设置新的Drive SDK项目,并将Open URL操作指向从1开始的url.这允许您使用自己的"Expiring share"样式选项扩展上下文菜单,以用于所选文件).
  1. Write an Apps Script using DriveApp and publish it as a web app.
  2. Setup a new Drive SDK project on the developers console and point an Open URL action to the url from 1. This allows you to extend the context menu with your own "Expiring share" style option for a selected file(s).

有一个精彩的Google I/O 2013会议,涵盖了整个过程: Google I/O 2013-将Google云端硬盘与Google Apps脚本.观看时,您会看到它以演示开始.深入上述步骤的技术细节将从13:10开始.

There is a fantastic Google I/O 2013 session that covers this entire process: Google I/O 2013 - Integrate Google Drive with Google Apps Script. When you watch it you'll see it starts out with a demo. The technical details diving into the above steps starts at 13:10.

这篇关于向Google云端硬盘添加菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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