fix(AwsS3 Node): Fix handling of bucket with dot in name (#8475)
This commit is contained in:
committed by
GitHub
parent
e643a126f4
commit
0febe62ad0
@@ -300,7 +300,7 @@ export class AwsS3V2 implements INodeType {
|
||||
headers['x-amz-request-payer'] = 'requester';
|
||||
}
|
||||
if (additionalFields.parentFolderKey) {
|
||||
path = `/${additionalFields.parentFolderKey}${folderName}/`;
|
||||
path = `${basePath}/${additionalFields.parentFolderKey}/${folderName}/`;
|
||||
}
|
||||
if (additionalFields.storageClass) {
|
||||
headers['x-amz-storage-class'] = snakeCase(
|
||||
@@ -778,7 +778,7 @@ export class AwsS3V2 implements INodeType {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
const tagsValues = (this.getNodeParameter('tagsUi', i) as IDataObject)
|
||||
.tagsValues as IDataObject[];
|
||||
let path = `${basePath}/`;
|
||||
let path = `${basePath}/${fileName}`;
|
||||
let body;
|
||||
|
||||
const multipartHeaders: IDataObject = {};
|
||||
@@ -788,9 +788,7 @@ export class AwsS3V2 implements INodeType {
|
||||
neededHeaders['x-amz-request-payer'] = 'requester';
|
||||
}
|
||||
if (additionalFields.parentFolderKey) {
|
||||
path = `${additionalFields.parentFolderKey}/${fileName}`;
|
||||
} else {
|
||||
path = `${fileName}`;
|
||||
path = `${basePath}/${additionalFields.parentFolderKey}/${fileName}`;
|
||||
}
|
||||
if (additionalFields.storageClass) {
|
||||
multipartHeaders['x-amz-storage-class'] = snakeCase(
|
||||
@@ -877,7 +875,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'POST',
|
||||
`/${path}?uploads`,
|
||||
`${path}?uploads`,
|
||||
body,
|
||||
qs,
|
||||
{ ...neededHeaders, ...multipartHeaders },
|
||||
@@ -899,7 +897,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'PUT',
|
||||
`/${path}?partNumber=${part}&uploadId=${uploadId}`,
|
||||
`${path}?partNumber=${part}&uploadId=${uploadId}`,
|
||||
chunk,
|
||||
qs,
|
||||
listHeaders,
|
||||
@@ -913,7 +911,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'DELETE',
|
||||
`/${path}?uploadId=${uploadId}`,
|
||||
`${path}?uploadId=${uploadId}`,
|
||||
);
|
||||
} catch (err) {
|
||||
throw new NodeOperationError(this.getNode(), err as Error);
|
||||
@@ -926,7 +924,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'GET',
|
||||
`/${path}?max-parts=${900}&part-number-marker=0&uploadId=${uploadId}`,
|
||||
`${path}?max-parts=${900}&part-number-marker=0&uploadId=${uploadId}`,
|
||||
'',
|
||||
qs,
|
||||
{ ...neededHeaders },
|
||||
@@ -978,7 +976,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'POST',
|
||||
`/${path}?uploadId=${uploadId}`,
|
||||
`${path}?uploadId=${uploadId}`,
|
||||
data,
|
||||
qs,
|
||||
{
|
||||
@@ -1015,7 +1013,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'PUT',
|
||||
`/${path || binaryPropertyData.fileName}`,
|
||||
path,
|
||||
body,
|
||||
qs,
|
||||
headers,
|
||||
@@ -1043,7 +1041,7 @@ export class AwsS3V2 implements INodeType {
|
||||
this,
|
||||
servicePath,
|
||||
'PUT',
|
||||
`/${path}`,
|
||||
path,
|
||||
body,
|
||||
qs,
|
||||
{ ...headers },
|
||||
|
||||
Reference in New Issue
Block a user