Skip to content

Commit

Permalink
feat: update upload route
Browse files Browse the repository at this point in the history
  • Loading branch information
Labham-Jain committed Oct 9, 2023
1 parent 9cfdc0c commit bd58520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/routes/global/uploads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const uploadFile = (router: Router, { s3Client }: { s3Client: S3Client })

const id = req.user.customer_id || req.user.userId;

const key = `${id}_${ulid()}.${ext}`
const key = `${id}/${ulid()}.${ext}`
const command = new PutObjectCommand({ Bucket: process.env.AWS_BUCKET, Key: key });

const url = await getSignedUrl(s3Client, command, { expiresIn: 300 }); // 5 minutes
Expand Down

0 comments on commit bd58520

Please sign in to comment.