package awskit-s3-lwt-unix

  1. Overview
  2. Docs

Module Object.TransferSource

val upload_file : t -> bucket:Awskit_s3.Bucket_name.t -> key:Awskit_s3.Object_key.t -> ?options:Awskit_s3.Transfer.upload_options -> ?on_progress:(Awskit_s3.Transfer.progress -> unit) -> path:string -> unit -> (Awskit_s3.Transfer.upload_result, Awskit_s3.Error.t) result Lwt.t

Upload a local file, using PutObject below the multipart threshold and multipart upload at or above it.

val download_file : t -> bucket:Awskit_s3.Bucket_name.t -> key:Awskit_s3.Object_key.t -> ?options:Awskit_s3.Transfer.download_options -> ?on_progress:(Awskit_s3.Transfer.progress -> unit) -> path:string -> unit -> (Awskit_s3.Transfer.download_result, Awskit_s3.Error.t) result Lwt.t

Download an object to a local file, using ranged GetObject requests at or above the multipart threshold. The selected overwrite policy controls whether an existing target is replaced or rejected before transport.

val multipart_upload_file : t -> bucket:Awskit_s3.Bucket_name.t -> key:Awskit_s3.Object_key.t -> ?options:Awskit_s3.Transfer.upload_options -> ?on_progress:(Awskit_s3.Transfer.progress -> unit) -> path:string -> unit -> (Awskit_s3.Transfer.multipart_upload_result, Awskit_s3.Error.t) result Lwt.t

Upload a local file with S3 multipart upload. The helper aborts the multipart upload when an Awskit-created upload fails before completion.

Resume a caller-owned multipart upload by verifying the upload with ListParts, uploading every local part into that upload, and completing from the fresh UploadPart results. Caller-owned uploads are not aborted on failure.