include user id in the uploads path
This commit is contained in:
@ -18,7 +18,7 @@ router.post('user.s3Upload', auth(), async ctx => {
|
|||||||
ctx.assertPresent(size, 'size is required');
|
ctx.assertPresent(size, 'size is required');
|
||||||
|
|
||||||
const s3Key = uuid.v4();
|
const s3Key = uuid.v4();
|
||||||
const key = `uploads/${s3Key}/${filename}`;
|
const key = `uploads/${ctx.state.user.id}/${s3Key}/${filename}`;
|
||||||
const policy = makePolicy();
|
const policy = makePolicy();
|
||||||
|
|
||||||
ctx.body = {
|
ctx.body = {
|
||||||
|
Reference in New Issue
Block a user