Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Update ffmpeg-video.ts

Richie McIlroyffff5bd5e30d
diff --git a/apps/media-server/src/lib/ffmpeg-video.ts b/apps/media-server/src/lib/ffmpeg-video.ts
index e93244538..f63feb892 100644
--- a/apps/media-server/src/lib/ffmpeg-video.ts
+++ b/apps/media-server/src/lib/ffmpeg-video.ts
@@ -459,17 +459,16 @@ export async function uploadFileToS3(
contentType: string,
): Promise<void> {
const fileHandle = file(filePath);
- const stream = fileHandle.stream();
+ const arrayBuffer = await fileHandle.arrayBuffer();
const response = await fetch(presignedUrl, {
method: "PUT",
headers: {
"Content-Type": contentType,
- "Content-Length": fileHandle.size.toString(),
+ "Content-Length": arrayBuffer.byteLength.toString(),
},
- body: stream,
- duplex: "half",
- } as RequestInit);
+ body: arrayBuffer,
+ });
if (!response.ok) {
throw new Error(