include user id in the uploads path

This commit is contained in:
Jori Lallo 2017-10-30 22:35:30 -07:00
parent 27fd10f2a6
commit c9fc880137
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ router.post('user.s3Upload', auth(), async ctx => {
ctx.assertPresent(size, 'size is required');
const s3Key = uuid.v4();
const key = `uploads/${s3Key}/${filename}`;
const key = `uploads/${ctx.state.user.id}/${s3Key}/${filename}`;
const policy = makePolicy();
ctx.body = {