Skip to content

Commit

Permalink
@remotion/lambda: Optimize S3 upload for slower internet connections
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Feb 13, 2025
1 parent 6d9b7a0 commit 3d85ed8
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 3d85ed8

Please sign in to comment.