Create a ManagedDownloader object with an s3 client and custom options if provided.
an S3 client to make requests.
configuration for the managed download.
an S3 client to make requests.
Download the individual parts of the file and write them to the stream sequentially. Download n = this.maxConcurrency parts in parallel and store parts which aren't the next part in memory until the stream is ready to read it.
params object contains the bucket and key.
the ManagedDownloaderStream stream transferring the parts of a file.
the length of the file.
if available, the amount to add to start and end byte when calculating the range.
the part number to start downloading from.
Get a download stream for a file stored in s3. Download the first part of size [maxPartSize] to get the content length and set headers for the stream. If the file length is less than [maxPartSize], or the client provides a part number, then return the stream. If not, call downloadByParts to split the rest of the file into parts of size [maxPartSize] and download [maxConcurrency] parts in parallel.
an object in the format { Bucket:string, Key:string, Range(optional):string, PartNumber(optional):number }.
ManagedDownloaderStream the PassThrough stream to read file data from.
wait for a stream to emit a drain event when it is ready to receive data again.
the stream that is being watched for the drain event.
Generated using TypeDoc
The ManagedDownloader class handles custom S3 downloads. A client can set options for the download such as the part size and the concurrency.