Download Binarydata stored in DB

Hi Outsystems Team,

In Reactive web, i have a requirement to download binarydata(pdf) which is stored in database. Which i should download from the screen by clicking the button or link.

Thanks

Anand

Use the download widget from the toolbar and pass the binary data, don't forget to give a name to the file like this "NameOfTheFile"+".pdf"

Hi Marcio Carvalho,

I have used download toolbar and gave the name as you said but it shows an error and could not open the file.

Kindly have a check on below image.

 but it shows an error and could not open the file.


I did a quick test where you can see how to download a pdf.

Check the OML

And also try to see if what you are downloading is empty or not debugging.

And a good thing to see is the console on the browser when you click f12 to open the developer tools.

ps: On my test, I saw that you don't need to put the ".pdf" :D

https://marcio-carvalho4.outsystemscloud.com/FindingMode/

pdf download.oml

@Anand Durai 

In your flow you are performing a refresh of your aggregate that should return the PDF. Refreshing data is an asynchronous operation. In your case the data is (not yet) fetched while you are trying to download the result.

Best

Stefan

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.