|
@@ -2,7 +2,6 @@ const AWS = require('aws-sdk');
|
|
|
const fs = require("fs");
|
|
|
const uuid = require('uuid');
|
|
|
|
|
|
-// 配置 AWS 访问凭证和 S3 区域
|
|
|
AWS.config.update({
|
|
|
accessKeyId: 'AKIA2TBT2JUNG6X3W737',
|
|
|
secretAccessKey: 'JhXpndfIrh+hFZHwHkYcVmFb+vziHyl9Z3eniXKo',
|
|
@@ -38,14 +37,14 @@ s3.upload(params)
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
- cloudfront.createInvalidation(params)
|
|
|
- .promise()
|
|
|
- .then(data => {
|
|
|
- console.log('CloudFront cache has been successfully refreshed.', data);
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error('Error refreshing CloudFront cache:', err);
|
|
|
- });
|
|
|
+ // cloudfront.createInvalidation(params)
|
|
|
+ // .promise()
|
|
|
+ // .then(data => {
|
|
|
+ // console.log('CloudFront cache has been successfully refreshed.', data);
|
|
|
+ // })
|
|
|
+ // .catch(err => {
|
|
|
+ // console.error('Error refreshing CloudFront cache:', err);
|
|
|
+ // });
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error('Error uploading file:', err);
|