Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/s3_lite_client/client.ts>Client#calculatePartSize

A lightweight but powerful S3 client for Deno
Go to Latest
method Client.prototype.calculatePartSize
import { Client } from "https://deno.land/x/s3_lite_client@0.6.1/client.ts";

Calculate part size given the object size. Part size will be at least this.partSize.

Per https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html we have to stick to the following rules:

  • part size between 5MB (this.maximumPartSize) and 5GB (this.maxObjectSize) (the final part can be smaller than 5MB however)
  • maximum of 10,000 parts per upload
  • maximum object size of 5TB

Parameters

size: number | undefined