Skip to content

🎥 Make videos programmatically with React

add mime-type to lambda artifacts

Jonny Burger4c7d855a5912
diff --git a/packages/lambda/src/functions/helpers/io.ts b/packages/lambda/src/functions/helpers/io.ts
index fb59721813..31ec66cd65 100644
--- a/packages/lambda/src/functions/helpers/io.ts
+++ b/packages/lambda/src/functions/helpers/io.ts
@@ -4,6 +4,7 @@ import {
PutObjectCommand,
_Object,
} from '@aws-sdk/client-s3';
+import {BundlerInternals} from '@remotion/bundler';
import {ReadStream} from 'fs';
import {Readable} from 'stream';
import {AwsRegion} from '../../pricing/aws-regions';
@@ -93,6 +94,8 @@ export const lambdaWriteFile = async ({
Body: body,
ACL: privacy === 'private' ? 'private' : 'public-read',
ExpectedBucketOwner: expectedBucketOwner ?? undefined,
+ ContentType:
+ BundlerInternals.mimeTypes.lookup(key) || 'application/octet-stream',
})
);
};