mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Minor improvements to S3-Node
This commit is contained in:
parent
a0f335b0c8
commit
248ccce5c3
|
@ -4,9 +4,9 @@ import {
|
|||
} from 'n8n-workflow';
|
||||
|
||||
|
||||
export class CustomS3Endpoint implements ICredentialType {
|
||||
name = 'customS3Endpoint';
|
||||
displayName = 'Custom S3';
|
||||
export class S3 implements ICredentialType {
|
||||
name = 's3';
|
||||
displayName = 'S3';
|
||||
properties = [
|
||||
{
|
||||
displayName: 'S3 endpoint',
|
|
@ -31,7 +31,7 @@ export async function s3ApiRequest(this: IHookFunctions | IExecuteFunctions | IL
|
|||
|
||||
let credentials;
|
||||
|
||||
credentials = this.getCredentials('customS3Endpoint');
|
||||
credentials = this.getCredentials('s3');
|
||||
|
||||
if (credentials === undefined) {
|
||||
throw new Error('No credentials got returned!');
|
||||
|
@ -70,7 +70,7 @@ export async function s3ApiRequest(this: IHookFunctions | IExecuteFunctions | IL
|
|||
headers: signOpts.headers,
|
||||
method,
|
||||
qs: query,
|
||||
uri: endpoint,
|
||||
uri: endpoint.toString(),
|
||||
body: signOpts.body,
|
||||
};
|
||||
|
||||
|
|
|
@ -49,12 +49,12 @@ import {
|
|||
export class S3 implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'S3',
|
||||
name: 'S3',
|
||||
icon: 'file:generic-s3.png',
|
||||
name: 's3',
|
||||
icon: 'file:s3.png',
|
||||
group: ['output'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Sends data to any S3-compatible services',
|
||||
description: 'Sends data to any S3-compatible service',
|
||||
defaults: {
|
||||
name: 'S3',
|
||||
color: '#d05b4b',
|
||||
|
@ -63,7 +63,7 @@ export class S3 implements INodeType {
|
|||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'customS3Endpoint',
|
||||
name: 's3',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
|
@ -117,7 +117,7 @@ export class S3 implements INodeType {
|
|||
let credentials;
|
||||
|
||||
try {
|
||||
credentials = this.getCredentials('customS3Endpoint');
|
||||
credentials = this.getCredentials('s3');
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB |
BIN
packages/nodes-base/nodes/S3/s3.png
Normal file
BIN
packages/nodes-base/nodes/S3/s3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -52,7 +52,7 @@
|
|||
"dist/credentials/CopperApi.credentials.js",
|
||||
"dist/credentials/CalendlyApi.credentials.js",
|
||||
"dist/credentials/CustomerIoApi.credentials.js",
|
||||
"dist/credentials/CustomS3Endpoint.credentials.js",
|
||||
"dist/credentials/S3.credentials.js",
|
||||
"dist/credentials/CrateDb.credentials.js",
|
||||
"dist/credentials/DisqusApi.credentials.js",
|
||||
"dist/credentials/DriftApi.credentials.js",
|
||||
|
|
Loading…
Reference in a new issue