Skip to content

Commit

Permalink
Fixed region
Browse files Browse the repository at this point in the history
  • Loading branch information
willemliufdmg committed May 8, 2023
1 parent aead217 commit d50c80a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ switch (environment) {
* Create S3 instance.
*/
const s3 = new S3({
region: process.env.IMGIX_UPLOAD_AWS_DEFAULT_REGION,
region,
credentials,
});

Expand Down Expand Up @@ -182,16 +182,15 @@ async function uploadToS3(absolutePath: string, hashedFileName: string) {
client: s3,

params: {
Bucket,
Body: compressedFile,
CacheControl,
Key: hashedFileName,
ContentType,
ContentEncoding: "gzip",
ACL: "public-read",
}
})
.done();
Bucket,
Body: compressedFile,
CacheControl,
Key: hashedFileName,
ContentType,
ContentEncoding: "gzip",
ACL: "public-read",
},
}).done();
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit d50c80a

Please sign in to comment.