package cordova-plugin-file-transfer

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = private Ojs.t
val create : unit -> t
type http_method =
  1. | Post
  2. | Put
type transfer_error_code =
  1. | File_not_found
  2. | Invalid_url
  3. | Connection
  4. | Abort
  5. | Not_modified
type transfer_error = private Ojs.t
val source : transfer_error -> string
val target : transfer_error -> string
val http_status : transfer_error -> int option
val body : transfer_error -> string option
val ext : transfer_error -> string
type upload_options = private Ojs.t
val create_upload_options : ?file_key:string -> ?file_name:string -> ?http_method:http_method -> ?mime_type:string -> ?params:Ojs.t -> ?chunked_mode:bool -> ?headers:Ojs.t array -> unit -> upload_options
type upload_result = private Ojs.t
val bytes_sent : upload_result -> int
val response_code : upload_result -> int
val response : upload_result -> string
val headers : upload_options -> Ojs.t
val upload : t -> string -> string -> (upload_result -> unit) -> (transfer_error -> unit) -> ?options:upload_options -> ?true_all_hosts:bool -> unit -> unit
type entry = private Ojs.t
val to_url : entry -> string
val download : t -> string -> string -> (entry -> unit) -> (transfer_error -> unit) -> ?true_all_hosts:bool -> unit -> unit
val abort : t -> unit