Library
Module
Module type
Parameter
Class
Class type
Representation of "files", what is their name, how to access their content.
val name : t -> string
Return the name used to upload the file.
val of_string : name:string -> string -> t
of_string name content
return a "file" with given name
and content
.
val of_path : ?name:string -> string -> t
of path path
create a "file" from a (full or relative) path
.
val of_in_channel : ?size:int -> name:string -> (unit -> in_channel) -> t
class type in_obj_channel = object ... end
The most basic input object for best interoperability.
val of_in_obj : ?size:int -> name:string -> (unit -> in_obj_channel) -> t
of_in_obj name create
return a "file" from an channel created with create
. The channel will be created (and then closed) when the file is sent with submit
.