From 488c2cecf1b03a6503e9eecc60d3d046ce1dbc55 Mon Sep 17 00:00:00 2001 From: Tyler Yu Date: Fri, 17 May 2024 22:10:41 -0700 Subject: [PATCH] feat: add await to s3Client --- packages/functions/src/routes/upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/functions/src/routes/upload.js b/packages/functions/src/routes/upload.js index 46efc9b..7c9ccef 100644 --- a/packages/functions/src/routes/upload.js +++ b/packages/functions/src/routes/upload.js @@ -34,7 +34,7 @@ uploadRouter.post("/image", async (req, res) => { const uploadCommand = new PutObjectCommand(uploadParams); - s3Client.send(uploadCommand); + await s3Client.send(uploadCommand); // const url = await getSignedUrl(s3Client, getCommand, { expiresIn: 3600 }); const url = `https://${Bucket.bucket.bucketName}.s3.amazonaws.com/${key}`;