From 7deb3745bf999569dbc5f5f877d2c3e27bb30d3b Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Sat, 13 May 2017 22:23:07 -0400 Subject: [PATCH] fix #354 --- server/controllers/aws.controller.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/controllers/aws.controller.js b/server/controllers/aws.controller.js index 2262c843..eda6b4c3 100644 --- a/server/controllers/aws.controller.js +++ b/server/controllers/aws.controller.js @@ -93,15 +93,14 @@ export function copyObjectInS3(req, res) { const params = { Bucket: `${process.env.S3_BUCKET}`, CopySource: `${process.env.S3_BUCKET}/${objectKey}`, - Key: `${userId}/${newFilename}` + Key: `${userId}/${newFilename}`, + ACL: 'public-read' }; const copy = client.copyObject(params); copy.on('err', (err) => { - console.log('in error'); console.log(err); }); copy.on('end', (data) => { - console.log(data); res.json({ url: `${s3Bucket}${userId}/${newFilename}` }); }); }