Announcement

Collapse
No announcement yet.

Access to attacment file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access to attacment file

    Good day

    Please, help. There is entity "Test" with 2 field = "name" as Varchar and "testFile" as File. How I can access to realy file name (/data/upload). I use Dropdown action in detail view button with handler:

    ===
    actionTest: function (data, e) {
    Espo.Ajax
    .getRequest('Test/' + this.view.model.id)
    .then(response => {
    console.log(response);
    });

    nametest = this.view.model.get('name'); // Ok
    namefile= this.view.model.get('test_file_id'); //WRONG (undefined)

    ...
    },
    ===
    I need real file name


  • #2
    Sorry, it's simple...
    namefile= this.view.model.get('testFileName'); - get name of uploaded file
    realnamefile= this.view.model.get('testFileId'); - get real name of uploaded file in /data/upload

    Thanks/

    Comment

    Working...
    X