File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,15 @@ The region the AWS `bucket` is located in.
104
104
105
105
* Default:* ` undefined `
106
106
107
+ ### endpoint
108
+
109
+ AWS (or AWS compatible endpoint) to use. E.g. with DigitalOcean Spaces, Microsoft Azure Blob Storage,
110
+ or Openstack Swift
111
+
112
+ If ` endpoint ` set the ` region ` option will be ignored.
113
+
114
+ * Default:* ` [region].s3.amazonaws.com `
115
+
107
116
### acl
108
117
109
118
The ACL to apply to the objects.
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ module.exports = CoreObject.extend({
27
27
const sessionToken = this . plugin . readConfig ( 'sessionToken' ) ;
28
28
const profile = this . plugin . readConfig ( 'profile' ) ;
29
29
const signatureVersion = this . plugin . readConfig ( 'signatureVersion' ) ;
30
+ const endpoint = this . plugin . readConfig ( 'endpoint' ) ;
30
31
31
32
if ( accessKeyId && secretAccessKey ) {
32
33
this . plugin . log ( 'Using AWS access key id and secret access key from config' , { verbose : true } ) ;
@@ -49,6 +50,11 @@ module.exports = CoreObject.extend({
49
50
AWS . config . credentials = new AWS . SharedIniFileCredentials ( { profile : profile } ) ;
50
51
}
51
52
53
+ if ( endpoint ) {
54
+ this . plugin . log ( 'Using endpoint from config' , { verbose : true } ) ;
55
+ s3Options . endpoint = new AWS . Endpoint ( endpoint ) ;
56
+ }
57
+
52
58
this . _client = this . plugin . readConfig ( 's3Client' ) || new AWS . S3 ( s3Options ) ;
53
59
} ,
54
60
You can’t perform that action at this time.
0 commit comments