Hi,
I’m trying to add upload to my form. Because I’m using REST API my post request i executing successfully but name of the file and size of the file is not showing in upload body (like is shown in http://docs.webix.com/desktop__file_upload.html - basic list uploader).
I’m using angular and my form looks like this.
$scope.addCorrespondenceForm = {
isolate: true,
view: "form",
type: "form",
id: "addcorrespondences",
datatype:"json",
width: 800,
css: "centerAlign",
elements: [
{
id:"formcells",
cells: [
{
rows:
[
{
view:"template",
template:"<h1>Correspondence</h1>",
height:100,
borderless:true
},
{ view: "combo", id: "direction", name: "direction", label: "Direction of Correspondence", invalidMessage: "User must select one of the choices"},
{ view: "text", id: "namecorrespondence", name: "namecorrespondence", label: "Name", invalidMessage: "This field cannot be empty",batch:"batch 1" },
{ view: "text", id: "addresscorrespondence", name: "addresscorrespondence", label: "Address", invalidMessage: "This field cannot be empty"},
{ view: "datepicker", id: "datetimecorrespondence", name: "datetimecorrespondence", label: "Date and Time", timepicker:true, invalidMessage: "This field cannot be empty"},
{view: "combo", id: "subjectmatter",name: "subjectmatter", label: "Subject Matter", invalidMessage: "User must select one of the choices"},
{ view: "text", id: "annexexpc", name: "annexexpc", label: "Annexes pcs", invalidMessage: "This field cannot be empty"},
{ view: "text", id: "annexextypes", name: "annexextypes", label: "Annexes types", invalidMessage: "This field cannot be empty"},
{ view: "datepicker", id: "datesent", name: "datesent", label: "Date Sent", timepicker:true, invalidMessage: "This field cannot be empty"},
{ view: "datepicker", id: "dateexp", name: "dateexp", label: "Date of expiration", timepicker:true, invalidMessage: "This field cannot be empty"},
{
rows:[
{
view:"uploader",
id: "documentfilename",
value:"Upload file",
link:"mylist",
name: "documentfilename",
upload:"app_dev.php/api/secure/cases/test-upload",
autosend: false
},
{
view:"list", id:"mylist", type:"uploader",
height: 100, borderless:true
}
]},
{view:"radio", label:"Decision", value:0, options:[
{ id:1, value:"ECAP Decision" }, //the initially selected item
{ id:2, value:"Supreme Court Decision" }
]},
{cols:[
{view:"button",id:"cancelcorrespondence",value: "Cancel"},
{ view: "button", width: 300,id: "submitcorrespondence", align: "left", value: "Submit", css: "button_primary button_raised" }
]}
]
}
]}],
elementsConfig: {
labelPosition: "top",
labelAlign: "left",
bottomPadding: 18,
labelWidth: 140
}
};
Please can you help me, how can Ishow information about uploaded file (name and size of file) in:
{
view:“list”, id:“mylist”, type:“uploader”,
height: 100, borderless:true
}
list like in link that i showed.
Thank you.