leeseohyeon

deleteFile 수정

......@@ -21,19 +21,19 @@ router.get('/:name', function (req, res) {
connection.query(sql1, [file_name, curPath, user_id], function (err) {
if (err) {
console.log('delete db error');
res.status(404).send({erorr: 'db delete error'});
res.send({erorr: 'db delete error'});
}
else {
connection.query(sql2, [file_name, '/trashcan'+curPath, user_id], function (err) {
if (err) {
console.log('insert in trashcan db error');
res.status(404).send({error: 'db insert error'});
res.send({error: 'db insert error'});
}
else {
// /drive/user_id/sourceFile --> /drive/user_id/trashcan/sourceFile
S3.moveFile2(S3.BUCKET_NAME, user_id, sourceFile, targetPath, function (result) {
if (result) {
res.satus(200).send("move to trashcan success");
res.send("move to trashcan success");
}
})
}
......
{
"accessKeyId": "ASIAZQ5XTMMFRYJNKBIQ",
"secretAccessKey": "NNsqT/NamEdilVYzp/dS8ys2MMlEDEmyreZb6VLJ",
"sessionToken": "FwoGZXIvYXdzELP//////////wEaDJMOjkb8lIC9vGm9uCLDAWLA9QiZ4tlf+5oJaJE3MQeD6PKFGE1xTVNBTIKOY6ROuMC+sHfKVONokm+comkRD5z2Mi4l7XxSQDmOM3TtcuxwsJWw5aIKKUUUqCQbzqEy2JSAsJxBMUDiUGQnIlYJDCuB+uWWvfgAxUrDz/ReJQeXmpuFOVIymn12jTXy4scLZcz22cpiZj4pr9d05VOkzUyXozIHGEVEHgIV1qdy5sJLMicz4RQi4+bIuE5w4lCYdpk0nzduAHStgyWEN0/VjEbJSCiG48b2BTIt675GjnR/TJwYd8BOnqKzAwQyF4WxMzAgJ2NaCwPcE0ZR2/KVYQoIO1Os/Vk6",
"accessKeyId": "ASIAZQ5XTMMF77IHPTR6",
"secretAccessKey": "IIDj5U3n6603WcAOf2OMTj2V6urKuGQaRGXABtVd",
"sessionToken": "FwoGZXIvYXdzENH//////////wEaDLvwZHLSr6GbUZyD0yLDAVKxxzxNeyC41xtvOmvV9Xmeor5N/Uy6byi1/D/9K6OoGSwdgPNlyyz5EzCsB3UDWtyWGSmIX9PreX0FX2wnD5/VHDl9QibRMUpXOBlg95BNHrfx0e7Srfn6a1GY8eN9ntiqiv7DuS3jV7I7L9NOE218dxDnt4hul8gStVZ4urSXlz4KUAXLucCbF4y2c/KuDVqKPM/9+MQgnL6f3bHThwNEhZhm4CjyHQYZgB2eGd9HYi95RYC9NglBi1gH60Iao8AELSi8wc32BTItNSdy9ymXld6zjj9OnqNzUZdm+GdCX8qFQ87nzVzmX7kHEOWnK9x+4zTHbGXx",
"region": "us-east-1"
}
\ No newline at end of file
......