Browse Source

feat: include project id

pull/2216/head
Wing-Kam Wong 3 years ago
parent
commit
a1b2d0ac25
  1. 5
      packages/nocodb/src/plugins/gcs/Gcs.ts
  2. 7
      packages/nocodb/src/plugins/gcs/index.ts

5
packages/nocodb/src/plugins/gcs/Gcs.ts

@ -72,6 +72,11 @@ export default class Gcs implements IStorageAdapter {
private_key: this.input.private_key.replace(/\\n/gm, '\n')
};
// default project ID would be used if it is not provided
if (this.input.project_id) {
options.projectId = this.input.project_id
}
this.bucketName = this.input.bucket;
this.storageClient = new Storage(options);

7
packages/nocodb/src/plugins/gcs/index.ts

@ -36,6 +36,13 @@ const config: XcPluginConfig = {
placeholder: 'Private Key',
type: XcType.Password,
required: true
},
{
key: 'project_id',
label: 'Project ID',
placeholder: 'Project ID',
type: XcType.SingleLineText,
required: false
}
],
actions: [

Loading…
Cancel
Save