Commit 0ef072ee by Pragati Upadhyay

conTentType

parent 8156cd54
......@@ -14,8 +14,6 @@ const s3 = new AWS.S3({
})
module.exports.uploadToAwsS3 = async function (localPath, remotePath,contentType,options) {
console.log("🚀 ~ contentType:", contentType)
console.log("🚀 ~ options:", options)
const buffer = Fs.readFileSync(localPath);
......@@ -27,7 +25,7 @@ console.log("🚀 ~ options:", options)
Key: remotePath,
};
if(contentType.contentType){
params.contentType = contentType.contentType
params.ContentType = contentType.contentType
}
s3.putObject(params, function (err, data) {
if (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment