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:14:46 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8515f02788f445138d7045baed7ce9418118e89b
8515f027
1 parent
426d5d24
즐겨찾기,회원가입 수정
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
backend/routes/favorites.js
backend/routes/userlogin/register.js
backend/routes/favorites.js
View file @
8515f02
This diff is collapsed. Click to expand it.
backend/routes/userlogin/register.js
View file @
8515f02
...
...
@@ -2,16 +2,11 @@ var express = require('express');
var
request
=
require
(
'request'
);
var
async
=
require
(
'async'
);
const
AWS
=
require
(
"aws-sdk"
);
AWS
.
config
.
loadFromPath
(
__dirname
+
"/../modules/awsconfig.json"
);
var
cryptoM
=
require
(
'./../../routes/modules/cryptoM.js'
);
const
BUCKET_NAME
=
"hong-s3-cloud"
;
const
s3
=
new
AWS
.
S3
({
accessKeyId
:
process
.
env
.
AWS_ACCESS_KEY_ID
,
secretAccessKey
:
process
.
env
.
AWS_SECRET_ACCESS_KEY
,
region
:
"ap-northeast-2"
});
const
s3
=
new
AWS
.
S3
();
var
router
=
express
.
Router
();
...
...
@@ -43,7 +38,7 @@ router.post('/', function(req, res, next) {
}
else
{
let
params
=
{
Bucket
:
BUCKET_NAME
,
Key
:
user_id
+
'/'
,
Key
:
'drive/'
+
user_id
+
'/'
,
Body
:
""
,
ACL
:
"public-read-write"
};
...
...
@@ -53,7 +48,7 @@ router.post('/', function(req, res, next) {
}
else
{
let
params2
=
{
Bucket
:
BUCKET_NAME
,
Key
:
user_id
+
'/share/'
,
Key
:
'drive/'
+
user_id
+
'/share/'
,
Body
:
""
,
ACL
:
"public-read-write"
};
...
...
@@ -63,7 +58,7 @@ router.post('/', function(req, res, next) {
}
else
{
let
params3
=
{
Bucket
:
BUCKET_NAME
,
Key
:
user_id
+
'/trashcan/'
,
Key
:
'drive/'
+
user_id
+
'/trashcan/'
,
Body
:
""
,
ACL
:
"public-read-write"
};
...
...
Please
register
or
login
to post a comment