Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lambdas/ingest/source/aws-s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ export default async function main(event, artifact) {

// S3 can perform a native copy of objects up to 5 GB using the CopyObject
// API. For objects larger than 5 GB, a multi-part upload must be used.
if (head.ContentLength < 5000000000) {
// We use multi-part uploads for files over 100 MB.
const MB = 10 ** 6; // 10^6 bytes = 1,000,000 B = 1 MB
if (head.ContentLength < 100 * MB) {
// Copies an existing S3 object to the S3 artifact bucket.
// https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#copyObject-property
// https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html
Expand Down