12 lines
315 B
JavaScript
12 lines
315 B
JavaScript
const AWS = require('aws-sdk');
|
|
require('dotenv').config();
|
|
|
|
const r2Endpoint = new AWS.Endpoint(process.env.R2_ENDPOINT);
|
|
const s3 = new AWS.S3({
|
|
endpoint: r2Endpoint,
|
|
accessKeyId: process.env.R2_ACCESS_KEY,
|
|
secretAccessKey: process.env.R2_SEC_KEY,
|
|
s3ForcePathStyle: true,
|
|
});
|
|
|
|
module.exports = s3; |