Skip to content

Commit 304c26f

Browse files
committed
[#358] add userId to object key
1 parent dd5e46c commit 304c26f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/controllers/aws.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function signS3(req, res) {
8383
const acl = 'private';
8484
const policy = S3Policy.generate({
8585
acl,
86-
key: filename,
86+
key: `${req.body.userId}/${filename}`,
8787
bucket: process.env.S3_BUCKET,
8888
contentType: req.body.type,
8989
region: process.env.AWS_REGION,

0 commit comments

Comments
 (0)