import { managedUpload } from "https://deno.land/x/aws_api@v0.8.1/extras/s3-upload.ts";
Uploads a Uint8Array stream of unknown size to an Amazon S3 endpoint.
The stream is buffered into chunks of fixed size (partSize
, 5MB by default).
The chunks are uploaded as a new S3 Multi-part Upload and then finalized.
Multiple chunks can upload at the same time (queueSize
, 4 by default).
This can result in faster uploads for larger files, compared to a single request.
Objects smaller than 5MB skip the multi-part logic entirely and use putObject
instead.
Note that multi-part uploads require different IAM permissions than simple uploads. Consider testing your application with files both above and below 5MB.
Parameters
params: CreateMultipartUploadRequest & { Body: ReadableStream<Uint8Array>; }