fix(S3 Node): Consider LocationConstraint from GetBucketLocation optional due to many non-compliant S3 implementations (#15432)

This commit is contained in:
Francis Vagner dos Anjos Fontoura 2025-10-03 12:55:35 -03:00 committed by GitHub
parent ec0999c647
commit 21abe2d557
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);