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 -> File.file 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:Dom_html.element Js.t Eliom_client_value.t -> ?ratio:float -> unit -> (unit -> unit) * cropping * [> `Div ] Eliom_content.Html.elt
val do_submit : Dom_html.inputElement Js.t Eliom_client_value.t -> ?progress:(int -> int -> unit) -> ?cropping:cropping -> upload:'a upload -> unit -> unit Lwt.t
val bind_submit : Dom_html.inputElement Js.t Eliom_client_value.t -> Dom_html.eventTarget Js.t Eliom_client_value.t -> ?cropping:cropping -> upload:'a upload -> after_submit:(unit -> unit Lwt.t) -> unit -> unit
val bind : ?container:Dom_html.element Js.t Eliom_client_value.t -> input:Dom_html.inputElement Js.t Eliom_client_value.t -> preview:Dom_html.imageElement Js.t -> ?crop:((unit -> unit) * cropping) -> submit:Dom_html.eventTarget Js.t Eliom_client_value.t -> upload:'a upload -> after_submit:(unit -> unit Lwt.t) -> unit -> unit
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
OCaml

Innovation. Community. Security.