DMXzone App Connect Support Product Page
  Solved 
 Dynamic Attributes Download output / as -
 Reported  10 Apr 2017  01:02:57 
  1 
     has   this problem  
  10 Apr 2017  01:02:57 Firdaus Rohman posted: 
 Why Dynamic Attributes > Download outputs link "/"as "-" , for example "/file/{{link}}" will output "-file-filename.ext" . Same result when using {{path}}. This gives problem to download.Or did I use the wrong step for file download?
I can achieve download by adding download attribute in addition to a href, but I have concern with the output supposedly returned by dmx-bind:download.
Official Solution
 Replied 12 Apr 2017  22:28:48 
  Hi Firdaus,
When you want download you just give the right url with href and add the download attribute, like explained in:
www.w3schools.com/tags/att_a_download.asp
When you are using App Connect and have a dynamic link then your href should be a Dynamic Attribute Href which generates the dmx-bind:href attribute that runtime replaces the regular href attribute.
So if the link is always downloadable file you can just add the "download" attribute to it.
If the download depends on some condition - then you can also use a Dynamic Attribute / Links / Download - and give it some expression to evaluate.
Greetings,
George
  When you want download you just give the right url with href and add the download attribute, like explained in:
www.w3schools.com/tags/att_a_download.asp
When you are using App Connect and have a dynamic link then your href should be a Dynamic Attribute Href which generates the dmx-bind:href attribute that runtime replaces the regular href attribute.
So if the link is always downloadable file you can just add the "download" attribute to it.
If the download depends on some condition - then you can also use a Dynamic Attribute / Links / Download - and give it some expression to evaluate.
Greetings,
George
Replies
 Replied 10 Apr 2017  07:13:27 
   10 Apr 2017  07:13:27 Teodor Kuduschiev replied: 
  Hi Fridaus,
I just test that and the links are generated just fine with "/" and no "-" instead. Please provide a link to your page.
  I just test that and the links are generated just fine with "/" and no "-" instead. Please provide a link to your page.
 Replied 10 Apr 2017  07:54:27 
   10 Apr 2017  07:54:27 Firdaus Rohman replied: 
  Hello Teodor,
Please check this out.
When you press download, it will return download file with initial -file-. I think it should be linked to /file/item.exe, not file renamed to -file-item.exe
  Please check this out.
When you press download, it will return download file with initial -file-. I think it should be linked to /file/item.exe, not file renamed to -file-item.exe
 Replied 10 Apr 2017  08:09:31 
   10 Apr 2017  08:09:31 Teodor Kuduschiev replied: 
  Please add the path to the file to href tag and use the download attribute without a link applied to it. 
   Replied 10 Apr 2017  08:31:48 
   10 Apr 2017  08:31:48 Firdaus Rohman replied: 
  That's what I do as mentioned in the main question. So what's the actual case usage of Dynamic Attributes > Download? 
   Replied 12 Apr 2017  22:28:48 
   12 Apr 2017  22:28:48 George Petrov replied: 
  Hi Firdaus,
When you want download you just give the right url with href and add the download attribute, like explained in:
www.w3schools.com/tags/att_a_download.asp
When you are using App Connect and have a dynamic link then your href should be a Dynamic Attribute Href which generates the dmx-bind:href attribute that runtime replaces the regular href attribute.
So if the link is always downloadable file you can just add the "download" attribute to it.
If the download depends on some condition - then you can also use a Dynamic Attribute / Links / Download - and give it some expression to evaluate.
Greetings,
George
  When you want download you just give the right url with href and add the download attribute, like explained in:
www.w3schools.com/tags/att_a_download.asp
When you are using App Connect and have a dynamic link then your href should be a Dynamic Attribute Href which generates the dmx-bind:href attribute that runtime replaces the regular href attribute.
So if the link is always downloadable file you can just add the "download" attribute to it.
If the download depends on some condition - then you can also use a Dynamic Attribute / Links / Download - and give it some expression to evaluate.
Greetings,
George
 Replied 13 Apr 2017  04:27:51 
   13 Apr 2017  04:27:51 Firdaus Rohman replied: 
  So there's no problem with Dynamic Attribute: Download.
I only need to learn how to use it properly.
Thank you.
  I only need to learn how to use it properly.
Thank you.

