Documentation

send

sends files from uploader body to server

void send(number| string| function id,object details);

Parameters

idnumber| string| functionfile ID or callback function
detailsobjectadditional data

See also

Example

$$("upl1").send(function(response){
    if(response)
        webix.message(response.status);
});
//response contains serverside response

Details

The method allows sending all the pre-added files at a time as well one file specified by ID::

$$("upl1").send();
$$("upl1").send(id);

Additionally, extra data can be send to server:

//any file specified by ID
$$("uploader").send(id, { param1:"value1", param2:"value2"});
 
$$("uploader").send(function(res){
        /*callback function*/
    }, 
    { param1:"value1", 
      param2:"value2"
    }
);

In case of autosend enabled, the additional data can be defined in the uploader configuration:

webix.ui({ 
    view:"uploader",
    formData:{
        param1:value1,
        param2:value2
    },
    ...
});
Back to top