type destination =
| TargetFile of string
| StringBuffer of Stdlib.Buffer.t
| ArrayBuffer of (char,
Stdlib.Bigarray.int8_unsigned_elt,
Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
type download = {
destination : destination;
range_spec : string;
}
val generate_range_spec : (int64 option * int64 option) list -> string
type source =
| File of string
| String of string
| Buffer of (char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
type t = {
source : source;
name : string;
content_type : string;
content_length : int64;
}
type state =
| Request
| Uploading
| Done
| Error
type upload_state = {
state : state;
resource : t;
chunk_size : int;
current_offset : int64;
}
val create_file_resource : ?content_type:string -> string -> t
val setup_file_upload : ?chunk_size:int -> string -> upload_state