log errors in s3 object copy
This commit is contained in:
parent
3c6049ceef
commit
dc9ad0eea9
1 changed files with 3 additions and 0 deletions
|
@ -96,6 +96,9 @@ export function copyObjectInS3(req, res) {
|
|||
Key: `${userId}/${newFilename}`
|
||||
};
|
||||
const copy = client.copyObject(params);
|
||||
copy.on('err', (err) => {
|
||||
console.log(err);
|
||||
});
|
||||
copy.on('end', () => {
|
||||
res.json({ url: `${s3Bucket}${userId}/${newFilename}` });
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue