Check documentation for the latest version of dhtmlxSuite getData DHTMLX Docs

getData

returns the list of already uploaded files

object getData();
objectthe list of already uploaded files

Example

var myUploader = myForm.getUploader(name);
var data1 = myUploader.getData();
// or
var data2 = myForm.getItemValue(name); // recommended, used in dp and set/get form data

Details

the returned list format is the following:

data1 = {
  id0:{
     realName: "..",
     serverName: "..."
  },
  id1: {...},
  ...
}
 
data2 = {
  myFiles_count: 2,
  myFiles_r_0: "electric_guitar-m101.jpg",
  myFiles_r_1: "electric-guitar.jpg",
  myFiles_s_0: "electric_guitar-m101.jpg",
  myFiles_s_1: "electric-guitar.jpg"
}

for data1:

  • id0,id1,.. - the inner id generated by the form (used just inside the form)
  • realName - the real name of the file (as it's displayed in the control)
  • serverName - the file name that the server returns after uploading (the server can return any value you will specify in it)

for data2:

  • (item's name)+“_count” - the count of uploaded files (item name “myFiles” is used for the code above)
  • (item's name)+“r”+(0..count-1) - the real name of the file
  • (item's name)+“s”+(0..count-1) - the file name that the server returns after uploading
Back to top