Create generic S3 node
This commit is contained in:
@@ -65,44 +65,9 @@ export class AwsS3 implements INodeType {
|
||||
{
|
||||
name: 'aws',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
endpoint: [
|
||||
'aws',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'customS3Endpoint',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
endpoint: [
|
||||
'customS3Endpoint',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Endpoint',
|
||||
name: 'endpoint',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'AWS',
|
||||
value: 'aws',
|
||||
},
|
||||
{
|
||||
name: 'Custom S3 endpoint',
|
||||
value: 'customS3Endpoint',
|
||||
},
|
||||
],
|
||||
default: 'aws',
|
||||
description: 'The endpoint of S3 compatible service.',
|
||||
},
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
@@ -151,14 +116,8 @@ export class AwsS3 implements INodeType {
|
||||
|
||||
let credentials;
|
||||
|
||||
const endpointType = this.getNodeParameter('endpoint', 0);
|
||||
|
||||
try {
|
||||
if (endpointType === 'aws') {
|
||||
credentials = this.getCredentials('aws');
|
||||
} else {
|
||||
credentials = this.getCredentials('customS3Endpoint');
|
||||
}
|
||||
credentials = this.getCredentials('aws');
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user