package ocsigen-toolkit

  1. Overview
  2. Docs
type cropping = (float * float * float * float) React.S.t
type 'a upload = ?progress:(int -> int -> unit) -> ?cropping:cropping -> Js_of_ocaml.File.file Js_of_ocaml.Js.t -> 'a Lwt.t
type ('a, 'b) service = (unit, 'a * ((float * float * float * float) option * Eliom_lib.file_info), Eliom_service.post, Eliom_service.non_att, Eliom_service.co, Eliom_service.non_ext, Eliom_service.reg, [ `WithoutSuffix ], unit, [ `One of 'a Eliom_parameter.ocaml ] Eliom_parameter.param_name * ([ `One of (float * float * float * float) option Eliom_parameter.ocaml ] Eliom_parameter.param_name * [ `One of Eliom_lib.file_info ] Eliom_parameter.param_name), 'b Eliom_service.ocaml) Eliom_service.t
val ocaml_service_upload : service:('a, 'b) service -> arg:'a -> 'b upload
val cropper : image:Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t Eliom_client_value.t -> ?ratio:float -> unit -> (unit -> unit) * cropping * [> `Div ] Eliom_content.Html.elt
val do_submit : Js_of_ocaml.Dom_html.inputElement Js_of_ocaml.Js.t Eliom_client_value.t -> ?progress:(int -> int -> unit) -> ?cropping:cropping -> upload:'a upload -> unit -> unit Lwt.t
val preview : ?a:[< Html_types.img_attrib Class ] Eliom_content.Html.attrib list -> unit -> [> `Img ] Eliom_content.Html.elt
val mk_form : ?after_submit:(unit -> unit Lwt.t) -> ?crop:float option -> ?input: ([< Html_types.label_attrib Class ] Eliom_content.Html.attrib list * [< Html_types.label_content_fun ] Eliom_content.Html.elt list) -> ?submit: ([< Html_types.button_attrib Class ] Eliom_content.Html.attrib list * [< Html_types.button_content_fun ] Eliom_content.Html.elt list) -> 'a upload -> [> `Form ] Eliom_content.Html.elt Lwt.t