| Table of Contents |
|---|
Create service account for the project
为项目创建服务帐户
- 转到 Go to https://console.developers.google.com/projectselector/permissions/serviceaccounts
- Select a project. You can create a new one too if you do not have one yet (e.g. jogetsample).
- 选择一个项目。如果还没有,也可以创建一个新的(例如jogetsample).
- 单击“ 创建服务帐户”。Click on Create Service Account.
- Name the service account (e.g. jogetsample).
Remember to check Furnish a new private key and also Enable Google Apps Domain-wide Delegation. Press Create.
- A .json file will be downloaded. Open up the file in your favorite text editor.
Enable Google Drive API for the project
- 命名服务帐户(例如jogetsample)。
请记得检查 提供新的私钥, 以及 启用Google Apps域范围的委派。按创建。 - 将下载.json文件。在您喜欢的文本编辑器中打开文件。
为项目启用Google Drive API
- 转到 Go to https://console.developers.google.com/apis/library
- Make sure that your current project is selected (e.g. jogetsample)确保选择了当前项目(例如jogetsample)。.
- Click on 点击Google Drive API.。
- Enable it.
Delegate Google Drive access to the project service account
- 启用它。
委派Google云端硬盘访问项目服务帐户
- 转到 Go to https://admin.google.com/AdminHome?chromeless=1#OGX:ManageOauthClients.
- From the downloaded JSON file earlier, copy the "client_id" and put into the Client Name field.
- 从之前下载的JSON文件中,复制“client_id”并将其放入“ 客户端名称”字段中。
在“ ”字段中 In the field
Code Block https://www.googleapis.com/auth/drive.file
Click Authorize.
...
单击“ 授权”
配置Joget Workflow App
From the downloaded JSON file earlier, copy the "client_email" and "private_key" values.
In your Joget app, select Google API Configuration in Properties & Export -> Set Default Plugin Properties
Key in the value of "client_email" value into OAuth 2.0 Client ID, and value of "private_key" into OAuth 2.0 Client Secret, then Submit.
Google Drive Form Element
从之前下载的JSON文件中,复制“client_email”和“private_key”值。
在您的Joget应用中,选择属性和导出中的 Google API配置- >设置默认插件属性
将“client_email”值的值键入OAuth 2.0客户端ID,将“private_key”的值键入OAuth 2.0 Client Secret,然后提交。
Google云端硬盘表单元素
- 完成上述步骤后,您就可以使用 Google Drive File f orm元素了。
- 只需配置要存储到哪个用户的Google云端硬盘,并相应地命名该文件夹。
- 上传的文件将遵循与本机“ 文件上载”元素相同的文件夹结构。以下是Google云端硬盘中的示例屏幕截图。
- With the steps above done, you are now ready to use the Google Drive File form element.
- Just configure on which user's Google Drive you want to store to and name the folder accordingly.
- Files uploaded will follow the same folder structure as the native File Upload element. Here's the sample screenshot in Google Drive.








