multipartUpload function

Future<List<Map<String, String>>> multipartUpload({
  1. required String filePath,
  2. required List<String> partsUrls,
  3. required BigInt chunkSize,
  4. required BigInt maxFiles,
  5. BigInt? parallelFailures,
  6. BigInt? maxRetries,
  7. FutureOr<void> callback(
    1. BigInt
    )?,
})

parts_urls: Dictionary consisting of part numbers as keys and the associated url as values completion_url: The url that should be called when the upload is finished max_files: Number of open file handles, which determines the maximum number of parallel uploads parallel_failures: Number of maximum failures of different chunks in parallel (cannot exceed max_files) max_retries: Number of maximum attempts per chunk. (Retries are exponentially backed off + jitter)

The number of threads can be tuned by the environment variable TOKIO_WORKER_THREADS as documented in https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.worker_threads

See https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html for more information on the multipart upload

Implementation

Future<List<Map<String, String>>> multipartUpload({
  required String filePath,
  required List<String> partsUrls,
  required BigInt chunkSize,
  required BigInt maxFiles,
  BigInt? parallelFailures,
  BigInt? maxRetries,
  FutureOr<void> Function(BigInt)? callback,
}) => api.multipartUpload(
  filePath: filePath,
  partsUrls: partsUrls,
  chunkSize: chunkSize,
  maxFiles: maxFiles,
  parallelFailures: parallelFailures,
  maxRetries: maxRetries,
  callback: callback ?? _callback,
);