diff --git a/src/config/awsS3.js b/src/config/awsS3.js index 34d950f4..6fa0f244 100644 --- a/src/config/awsS3.js +++ b/src/config/awsS3.js @@ -1,9 +1,9 @@ -// import { S3Client } from '@aws-sdk/client-s3'; +import { S3Client } from "@aws-sdk/client-s3"; -// export default new S3Client({ -// region: process.env.REACT_APP_AWS_S3_REGION, -// credentials: { -// accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID, -// secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY, -// }, -// }); +export default new S3Client({ + region: process.env.REACT_APP_AWS_S3_REGION, + credentials: { + accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY, + }, +}); diff --git a/src/utils/VoiceAnalyser.js b/src/utils/VoiceAnalyser.js index a0883824..2e8e2694 100644 --- a/src/utils/VoiceAnalyser.js +++ b/src/utils/VoiceAnalyser.js @@ -30,7 +30,8 @@ import { } from "./constants"; import config from "./urlConstants.json"; import { filterBadWords } from "./Badwords"; -// import S3Client from '../config/awsS3'; +import S3Client from "../config/awsS3"; +import { PutObjectCommand } from "@aws-sdk/client-s3"; /* eslint-disable */ const AudioPath = { @@ -363,7 +364,7 @@ function VoiceAnalyser(props) { // TODO: Remove false when REACT_APP_AWS_S3_BUCKET_NAME and keys added var audioFileName = ""; - if (process.env.REACT_APP_CAPTURE_AUDIO === "true" && false) { + if (process.env.REACT_APP_CAPTURE_AUDIO === "true") { let getContentId = currentLine; audioFileName = `${ process.env.REACT_APP_CHANNEL