How to get {{$item}} in url ? ( Repeat Content )

Hello,

After i asked for answer on my post before, no one aswer it, and now i found on my own.
I can show fileName, i can get the url.
But i can’t download it, because the url showed it was wrong.
Here what i got on the url.

  1. upload file.
    uploadFile

  2. download file
    download file

Urgently need your hand.

Thanks

Dhany Lugina

2 Likes

Hi,
You should try to prefix the document URL with “…/API/”.
something like ../API/{{$item.url}}
We use the same path prefix as for bonita REST API calls.

My mistake.
You cannot use a variable since it will be evaluated before $item is resolved.
Instead, remove the variable itemURL and simply put in the target URL field “…/API/”+$item.url
HTH

Hi anthony,

Thank you for your answer, but sorry i still don’t get it.
do you mean like this ?

![img][img]
[img]: http://s17.postimg.org/gkqvyluwf/lke.png

Don’t choose “External API” type since you don’t need to perfom any additional API call.
Choose “String” or build the URL using a “Javascript expression”.

hi anthony,

i changed already, but it still doesn’t work.
here what i got.
change
got

My mistake.
You cannot use a variable since it will be evaluated before $item is resolved.
Instead, remove the variable itemURL and simply put in the target URL field “…/API/”+$item.url
HTH