How can I create the download link in front end for a file?

Hello,

i want to download datas from my back end as an xlsx file.

so i created a business process that creates a xlsx file from my back end data and gives out the file id
then i created a api with the “get file” bussines process and adjusted the api response type to give out a download file.
now i can successfully call the api with the file id and get a download link in the API swagger.

  • but i didnt managed to get this download link in front end because the api is just giving me a bytes variable as output.

do you have an advice how to create the download link in web application?

You can create new function for your web-app to convert file id into url for downloading (using standart prebuilt endpoint). Make sure that endpoint is open for unauthorized users.

Now you can use it to download file (backend response should be file id)

thank you so much. this worked perfectly