From f675ec514b2aa303c15e75639cec9923089bae23 Mon Sep 17 00:00:00 2001 From: Alan Scherger Date: Fri, 30 Aug 2024 00:21:54 +0000 Subject: [PATCH] [fix] add webm extension for safari --- src/server/api/routers/video.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/api/routers/video.ts b/src/server/api/routers/video.ts index a7c790e..bd86633 100644 --- a/src/server/api/routers/video.ts +++ b/src/server/api/routers/video.ts @@ -88,7 +88,7 @@ export const videoRouter = createTRPCRouter({ const getObjectCommand = new GetObjectCommand({ Bucket: env.AWS_BUCKET_NAME, - Key: video.userId + "/" + video.id, + Key: video.userId + "/" + video.id + ".webm", }); const signedUrl = await getSignedUrl(s3, getObjectCommand); @@ -156,7 +156,7 @@ export const videoRouter = createTRPCRouter({ s3, new PutObjectCommand({ Bucket: env.AWS_BUCKET_NAME, - Key: session.user.id + "/" + video.id, + Key: session.user.id + "/" + video.id + ".webm", }) ); @@ -345,7 +345,7 @@ export const videoRouter = createTRPCRouter({ const deleteVideoObject = await s3.send( new DeleteObjectCommand({ Bucket: env.AWS_BUCKET_NAME, - Key: session.user.id + "/" + input.videoId, + Key: session.user.id + "/" + input.videoId + ".webm", }) );