Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(process-video): skip raw upload cleanup when raw key matches output key

ManthanNimodiya8d6482e15591
diff --git a/apps/web/workflows/process-video.ts b/apps/web/workflows/process-video.ts
index c646ce242..ada943223 100644
--- a/apps/web/workflows/process-video.ts
+++ b/apps/web/workflows/process-video.ts
@@ -48,7 +48,11 @@ export async function processVideoWorkflow(
);
await saveMetadataAndComplete(videoId, result.metadata);
- await cleanupRawUpload(videoId, rawFileKey);
+
+ const outputKey = `${userId}/${videoId}/result.mp4`;
+ if (rawFileKey !== outputKey) {
+ await cleanupRawUpload(videoId, rawFileKey);
+ }
return {
success: true,