Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
D_Team_Khuloud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
leeseohyeon
2020-05-31 16:59:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4a9dd77a6bea5c86ff7beb1928bc9b3632fbd022
4a9dd77a
1 parent
9525e09a
deleteFile 수정
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
backend/routes/file/deleteFile.js
backend/routes/modules/awsconfig.json
backend/routes/file/deleteFile.js
View file @
4a9dd77
...
...
@@ -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
.
s
tatus
(
404
).
s
end
({
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
.
s
tatus
(
404
).
s
end
({
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
.
s
atus
(
200
).
s
end
(
"move to trashcan success"
);
res
.
send
(
"move to trashcan success"
);
}
})
}
...
...
backend/routes/modules/awsconfig.json
View file @
4a9dd77
{
"accessKeyId"
:
"ASIAZQ5XTMMF
RYJNKBIQ
"
,
"secretAccessKey"
:
"
NNsqT/NamEdilVYzp/dS8ys2MMlEDEmyreZb6VLJ
"
,
"sessionToken"
:
"FwoGZXIvYXdzE
LP//////////wEaDJMOjkb8lIC9vGm9uCLDAWLA9QiZ4tlf+5oJaJE3MQeD6PKFGE1xTVNBTIKOY6ROuMC+sHfKVONokm+comkRD5z2Mi4l7XxSQDmOM3TtcuxwsJWw5aIKKUUUqCQbzqEy2JSAsJxBMUDiUGQnIlYJDCuB+uWWvfgAxUrDz/ReJQeXmpuFOVIymn12jTXy4scLZcz22cpiZj4pr9d05VOkzUyXozIHGEVEHgIV1qdy5sJLMicz4RQi4+bIuE5w4lCYdpk0nzduAHStgyWEN0/VjEbJSCiG48b2BTIt675GjnR/TJwYd8BOnqKzAwQyF4WxMzAgJ2NaCwPcE0ZR2/KVYQoIO1Os/Vk6
"
,
"accessKeyId"
:
"ASIAZQ5XTMMF
77IHPTR6
"
,
"secretAccessKey"
:
"
IIDj5U3n6603WcAOf2OMTj2V6urKuGQaRGXABtVd
"
,
"sessionToken"
:
"FwoGZXIvYXdzE
NH//////////wEaDLvwZHLSr6GbUZyD0yLDAVKxxzxNeyC41xtvOmvV9Xmeor5N/Uy6byi1/D/9K6OoGSwdgPNlyyz5EzCsB3UDWtyWGSmIX9PreX0FX2wnD5/VHDl9QibRMUpXOBlg95BNHrfx0e7Srfn6a1GY8eN9ntiqiv7DuS3jV7I7L9NOE218dxDnt4hul8gStVZ4urSXlz4KUAXLucCbF4y2c/KuDVqKPM/9+MQgnL6f3bHThwNEhZhm4CjyHQYZgB2eGd9HYi95RYC9NglBi1gH60Iao8AELSi8wc32BTItNSdy9ymXld6zjj9OnqNzUZdm+GdCX8qFQ87nzVzmX7kHEOWnK9x+4zTHbGXx
"
,
"region"
:
"us-east-1"
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment