From 21abe2d55793f60bdc274b3ed430baf335ccc655 Mon Sep 17 00:00:00 2001 From: Francis Vagner dos Anjos Fontoura Date: Fri, 3 Oct 2025 12:55:35 -0300 Subject: [PATCH] fix(S3 Node): Consider LocationConstraint from GetBucketLocation optional due to many non-compliant S3 implementations (#15432) --- packages/nodes-base/nodes/S3/S3.node.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index dd650f883c3..9127154da68 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -229,7 +229,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._ as string; + const region = responseData.LocationConstraint?._ as string | undefined; if (returnAll) { responseData = await s3ApiRequestSOAPAllItems.call( @@ -295,7 +295,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; responseData = await s3ApiRequestSOAP.call( this, @@ -324,7 +324,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; responseData = await s3ApiRequestSOAPAllItems.call( this, @@ -420,7 +420,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; if (returnAll) { responseData = await s3ApiRequestSOAPAllItems.call( @@ -558,7 +558,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; responseData = await s3ApiRequestSOAP.call( this, @@ -597,7 +597,7 @@ export class S3 implements INodeType { location: '', }); - region = region.LocationConstraint._; + region = region.LocationConstraint?._; const response = await s3ApiRequestREST.call( this, @@ -656,7 +656,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; responseData = await s3ApiRequestSOAP.call( this, @@ -699,7 +699,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; if (returnAll) { responseData = await s3ApiRequestSOAPAllItems.call( @@ -833,7 +833,7 @@ export class S3 implements INodeType { location: '', }); - const region = responseData.LocationConstraint._; + const region = responseData.LocationConstraint?._; if (isBinaryData) { const binaryPropertyName = this.getNodeParameter('binaryPropertyName', 0);