Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): pass preview gif presigned URL through multipart remux

Richie McIlroy652b112658b6
diff --git a/apps/web/app/api/upload/[...route]/multipart.ts b/apps/web/app/api/upload/[...route]/multipart.ts
index 84612f151..c4bfed4b0 100644
--- a/apps/web/app/api/upload/[...route]/multipart.ts
+++ b/apps/web/app/api/upload/[...route]/multipart.ts
@@ -540,6 +540,16 @@ app.post(
},
{ expiresIn: MEDIA_SERVER_PRESIGNED_PUT_EXPIRES_SECONDS },
);
+ const previewGifKey = `${user.id}/${videoId}/preview/animated-preview.gif`;
+ const previewGifPresignedUrl =
+ yield* bucket.getInternalPresignedPutUrl(
+ previewGifKey,
+ {
+ ContentType: "image/gif",
+ CacheControl: "public, max-age=31536000, immutable",
+ },
+ { expiresIn: MEDIA_SERVER_PRESIGNED_PUT_EXPIRES_SECONDS },
+ );
yield* Effect.tryPromise({
try: async () => {
@@ -558,6 +568,7 @@ app.post(
userId: user.id,
videoUrl: inputUrl,
outputPresignedUrl,
+ previewGifPresignedUrl,
remuxOnly: true,
}),
},