smart-file-upload
Version:
Smart file upload
20 lines • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SingletonS3Client = void 0;
const client_s3_1 = require("@aws-sdk/client-s3");
class SingletonS3Client {
static get() {
if (!SingletonS3Client.instance) {
SingletonS3Client.instance = new client_s3_1.S3Client({
region: process.env.S3_BUCKET_REGION,
credentials: {
accessKeyId: process.env.S3_ACCESS_KEY,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
},
});
}
return SingletonS3Client.instance;
}
}
exports.SingletonS3Client = SingletonS3Client;
//# sourceMappingURL=singleton.js.map