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
Hong
2020-06-08 01:42:04 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dd4a30efe704bc0b847cd77ecb81fab2d86975f8
dd4a30ef
1 parent
8515f027
폴더수정
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
backend/routes/folders.js
backend/routes/folders.js
View file @
dd4a30e
...
...
@@ -54,7 +54,7 @@ router.post('/makefolder', function(req, res, next) {
let
date
=
moment
().
format
();
let
params
=
{
Bucket
:
BUCKET_NAME
,
Key
:
curPath
+
folder_name
+
'/'
,
Key
:
'drive/'
+
curPath
+
folder_name
+
'/'
,
Body
:
""
,
ACL
:
"public-read-write"
};
...
...
@@ -104,7 +104,7 @@ router.post('/delfolder', function(req, res, next) {
let
folder_name
=
req
.
body
.
folder_name
;
let
params
=
{
Bucket
:
BUCKET_NAME
,
Key
:
curPath
+
folder_name
+
'/'
Key
:
'drive/'
+
curPath
+
folder_name
+
'/'
};
let
checksql
=
'SELECT * FROM folders WHERE location = ? AND folder_name = ? AND user_id = ?;'
;
let
values
=
[
cur
,
folder_name
,
user_id
];
...
...
@@ -160,12 +160,12 @@ router.post('/move', function(req, res, next) {
if
(
rows
.
length
!=
0
)
{
let
copy_params
=
{
Bucket
:
BUCKET_NAME
,
CopySource
:
BUCKET_NAME
+
'/'
+
curPath
+
name
+
'/'
,
Key
:
newPath
+
name
+
'/'
CopySource
:
BUCKET_NAME
+
'/
drive/
'
+
curPath
+
name
+
'/'
,
Key
:
'drive/'
+
newPath
+
name
+
'/'
};
let
del_params
=
{
Bucket
:
BUCKET_NAME
,
Key
:
curPath
+
name
+
'/'
Key
:
'drive/'
+
curPath
+
name
+
'/'
};
s3
.
copyObject
(
copy_params
,
function
(
err
,
data
)
{
if
(
err
)
{
...
...
@@ -209,12 +209,12 @@ router.post('/move', function(req, res, next) {
if
(
rows
.
length
!=
0
)
{
let
copy_params
=
{
Bucket
:
BUCKET_NAME
,
CopySource
:
BUCKET_NAME
+
'/'
+
curPath
+
file
,
Key
:
newPath
+
file
CopySource
:
BUCKET_NAME
+
'/
drive/
'
+
curPath
+
file
,
Key
:
'drive/'
+
newPath
+
file
};
let
del_params
=
{
Bucket
:
BUCKET_NAME
,
Key
:
curPath
+
file
Key
:
'drive/'
+
curPath
+
file
};
s3
.
copyObject
(
copy_params
,
function
(
err
,
data
)
{
if
(
err
)
{
...
...
@@ -267,12 +267,12 @@ router.post('/modify', function(req, res, next) {
if
(
rows
.
length
!=
0
)
{
let
copy_params
=
{
Bucket
:
BUCKET_NAME
,
CopySource
:
BUCKET_NAME
+
'/'
+
curPath
+
name
+
'/'
,
Key
:
curPath
+
newName
+
'/'
CopySource
:
BUCKET_NAME
+
'/
drive/
'
+
curPath
+
name
+
'/'
,
Key
:
'drive/'
+
curPath
+
newName
+
'/'
};
let
del_params
=
{
Bucket
:
BUCKET_NAME
,
Key
:
curPath
+
name
+
'/'
Key
:
'drive/'
+
curPath
+
name
+
'/'
};
s3
.
copyObject
(
copy_params
,
function
(
err
,
data
)
{
if
(
err
)
{
...
...
Please
register
or
login
to post a comment