@aws-sdk/lib-storage 3.204.0 → 3.208.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Upload.js +11 -3
- package/dist-es/Upload.js +11 -3
- package/package.json +6 -6
package/dist-cjs/Upload.js
CHANGED
|
@@ -82,9 +82,17 @@ class Upload extends events_1.EventEmitter {
|
|
|
82
82
|
.map((segment) => (0, smithy_client_1.extendedEncodeURIComponent)(segment))
|
|
83
83
|
.join("/");
|
|
84
84
|
const locationBucket = (0, smithy_client_1.extendedEncodeURIComponent)(this.params.Bucket);
|
|
85
|
-
const Location =
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
const Location = (() => {
|
|
86
|
+
const endpointHostnameIncludesBucket = endpoint.hostname.startsWith(`${locationBucket}.`);
|
|
87
|
+
const forcePathStyle = this.client.config.forcePathStyle;
|
|
88
|
+
if (forcePathStyle) {
|
|
89
|
+
return `${endpoint.protocol}//${endpoint.hostname}/${locationBucket}/${locationKey}`;
|
|
90
|
+
}
|
|
91
|
+
if (endpointHostnameIncludesBucket) {
|
|
92
|
+
return `${endpoint.protocol}//${endpoint.hostname}/${locationKey}`;
|
|
93
|
+
}
|
|
94
|
+
return `${endpoint.protocol}//${locationBucket}.${endpoint.hostname}/${locationKey}`;
|
|
95
|
+
})();
|
|
88
96
|
this.singleUploadResult = {
|
|
89
97
|
...putResult,
|
|
90
98
|
Bucket: this.params.Bucket,
|
package/dist-es/Upload.js
CHANGED
|
@@ -77,9 +77,17 @@ export class Upload extends EventEmitter {
|
|
|
77
77
|
.map((segment) => extendedEncodeURIComponent(segment))
|
|
78
78
|
.join("/");
|
|
79
79
|
const locationBucket = extendedEncodeURIComponent(this.params.Bucket);
|
|
80
|
-
const Location =
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
const Location = (() => {
|
|
81
|
+
const endpointHostnameIncludesBucket = endpoint.hostname.startsWith(`${locationBucket}.`);
|
|
82
|
+
const forcePathStyle = this.client.config.forcePathStyle;
|
|
83
|
+
if (forcePathStyle) {
|
|
84
|
+
return `${endpoint.protocol}//${endpoint.hostname}/${locationBucket}/${locationKey}`;
|
|
85
|
+
}
|
|
86
|
+
if (endpointHostnameIncludesBucket) {
|
|
87
|
+
return `${endpoint.protocol}//${endpoint.hostname}/${locationKey}`;
|
|
88
|
+
}
|
|
89
|
+
return `${endpoint.protocol}//${locationBucket}.${endpoint.hostname}/${locationKey}`;
|
|
90
|
+
})();
|
|
83
91
|
this.singleUploadResult = {
|
|
84
92
|
...putResult,
|
|
85
93
|
Bucket: this.params.Bucket,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/lib-storage",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.208.0",
|
|
4
4
|
"description": "Storage higher order operation",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
28
|
-
"@aws-sdk/smithy-client": "3.
|
|
27
|
+
"@aws-sdk/middleware-endpoint": "3.208.0",
|
|
28
|
+
"@aws-sdk/smithy-client": "3.208.0",
|
|
29
29
|
"buffer": "5.6.0",
|
|
30
30
|
"events": "3.3.0",
|
|
31
31
|
"stream-browserify": "3.0.0",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@aws-sdk/client-s3": "^3.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@aws-sdk/abort-controller": "3.
|
|
40
|
-
"@aws-sdk/client-s3": "3.
|
|
41
|
-
"@aws-sdk/types": "3.
|
|
39
|
+
"@aws-sdk/abort-controller": "3.208.0",
|
|
40
|
+
"@aws-sdk/client-s3": "3.208.0",
|
|
41
|
+
"@aws-sdk/types": "3.208.0",
|
|
42
42
|
"@tsconfig/recommended": "1.0.1",
|
|
43
43
|
"@types/node": "^14.11.2",
|
|
44
44
|
"concurrently": "7.0.0",
|