Skip to content

Commit

Permalink
Merge pull request #4884 from remotion-dev/lambda-optimize-upload-for…
Browse files Browse the repository at this point in the history
…-slower-internet-connections

`@remotion/lambda`: Optimize S3 upload for slower internet connections
  • Loading branch information
JonnyBurger authored Feb 13, 2025
2 parents a374e5a + 3d85ed8 commit 16a2ce2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/lambda/src/api/upload-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ export const uploadDir = async ({
? 'private'
: 'public-read';

const paralellUploads3 = new Upload({
const parallelUploadsS3 = new Upload({
client,
queueSize: 4,
partSize: 5 * 1024 * 1024,
queueSize: 2,
partSize: 40 * 1024 * 1024,
params: {
Key,
Bucket: bucket,
Expand All @@ -113,10 +113,10 @@ export const uploadDir = async ({
ContentType,
},
});
paralellUploads3.on('httpUploadProgress', (progress) => {
parallelUploadsS3.on('httpUploadProgress', (progress) => {
progresses[filePath.name] = progress.loaded ?? 0;
});
const prom = await paralellUploads3.done();
const prom = await parallelUploadsS3.done();
return prom;
};

Expand Down

0 comments on commit 16a2ce2

Please sign in to comment.