File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1- var s3 = new ( require ( 'aws-sdk' ) ) . S3 ( { params : { Bucket : process . env . S3_BUCKET_NAME } } ) ;
1+ var AWS = require ( 'aws-sdk' )
2+ AWS . config . logger = console ;
3+
4+ var s3_options = { params : { Bucket : process . env . S3_BUCKET_NAME } }
5+
6+ // if (process.env.S3_REGION)
7+ // s3_options.region = process.env.S3_REGION
8+ if ( process . env . S3_ENDPOINT )
9+ s3_options . endpoint = new AWS . Endpoint ( process . env . S3_ENDPOINT )
10+
11+ var s3 = new AWS . S3 ( s3_options ) ;
212
313module . exports = {
414
@@ -55,7 +65,7 @@ module.exports = {
5565 s3 . putObject ( {
5666 Key : key ,
5767 ContentType : 'text/html;charset=UTF-8' ,
58- StorageClass : 'REDUCED_REDUNDANCY' ,
68+ // StorageClass: 'REDUCED_REDUNDANCY',
5969 Body : req . prerender . content
6070 } , function ( err , result ) {
6171
Original file line number Diff line number Diff line change 66 "author" : " Todd Hooper" ,
77 "license" : " MIT" ,
88 "dependencies" : {
9- "aws-sdk" : " ~ 2.307.0"
9+ "aws-sdk" : " ^ 2.307.0"
1010 }
1111}
You can’t perform that action at this time.
0 commit comments