videosphere
    Preparing search index...

    Function computeMultipartPlan

    • Computes multipart upload part count and fixed part size for a file.

      Parameters

      • fileSize: number

        Total object size in bytes.

      • partSizeBytes: number = DEFAULT_MULTIPART_PART_SIZE_BYTES

        Part size in bytes (default DEFAULT_MULTIPART_PART_SIZE_BYTES).

      Returns { partCount: number; partSize: number }

      Part count and the part size used for every part except the last (which may be smaller).

      When fileSize is invalid, partSizeBytes is below 5 MiB, or the plan would exceed 10,000 parts.