How to use relative path in Interface Asset Rest JSON

Hi,
I have a Interface Asset with a REST JSON call, which gives me a list of songs to play. In the JSON is the filename of the mp3-File. I store the mp3-Files locally in [Project-Folder]/Music/

As the project must be portable, how can I reference (with Text-Concatenation) the location of the mp3-File for the audio-player in the trigger?

I tried with “./Music/” + filename, but that does not work.

Thanks for any help (maybe a stupid question?)

Another question: I tried with a global Variable, but I can’t use it in Text-concatenation?

Hi @mgeyer and welcome to the Intuiface community!

As of today, relative paths within a local REST / JSON Interface Asset are not implemented. I can see a couple of options to handle this situation for you

For further questions and faster answers, I’d recommend you to contact our support team here.

Did you try referencing them from an excel sheet ?? that way your music goes wherever the XP goes as you mentioned the project must be portable.

Thanks for your answer. The concatenation is, what I used. But on the developing device the path is different. So I always have to remember to change that before deploying.

1 Like

The list of music must be administered from a website, so I can’t use excel. But thanks for your answer!

If the music is administered from a website then the full path excluding the file name should be the same for all, you can use that. Maybe I am missing something. I have done quite some similar stuff and maybe can come up with a solution if you let me know more about your project.

1 Like

Yes, the path is the same for all mp3-Files. But the absolute path on the player is different from the development computer. Maybe I can solve the problem just with an symbolic link.

Cool, in that case I guess you got it solved…