File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,15 @@ The region the AWS `bucket` is located in.
104104
105105* Default:* ` undefined `
106106
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+
107116### acl
108117
109118The ACL to apply to the objects.
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ module.exports = CoreObject.extend({
2727 const sessionToken = this . plugin . readConfig ( 'sessionToken' ) ;
2828 const profile = this . plugin . readConfig ( 'profile' ) ;
2929 const signatureVersion = this . plugin . readConfig ( 'signatureVersion' ) ;
30+ const endpoint = this . plugin . readConfig ( 'endpoint' ) ;
3031
3132 if ( accessKeyId && secretAccessKey ) {
3233 this . plugin . log ( 'Using AWS access key id and secret access key from config' , { verbose : true } ) ;
@@ -49,6 +50,11 @@ module.exports = CoreObject.extend({
4950 AWS . config . credentials = new AWS . SharedIniFileCredentials ( { profile : profile } ) ;
5051 }
5152
53+ if ( endpoint ) {
54+ this . plugin . log ( 'Using endpoint from config' , { verbose : true } ) ;
55+ s3Options . endpoint = new AWS . Endpoint ( endpoint ) ;
56+ }
57+
5258 this . _client = this . plugin . readConfig ( 's3Client' ) || new AWS . S3 ( s3Options ) ;
5359 } ,
5460
You can’t perform that action at this time.
0 commit comments