Hi All,
Can anyone suggest how to download the file from file path in reactive,downoad widget accepts binary but Binary not available.
Hi @ujwala TUse File_ReadBinary provided by FileSystem extension to read the file from path then pass output to download node as shown in belew image to download the content.
Also check the below linkhttps://www.outsystems.com/forums/discussion/41051/download-file-from-certain-directory-in-the-server/#
Regards
Krishnanand Pathak
Hi ujwala
You can refer Outsystems documentation for more knowledge on downloads
https://success.outsystems.com/documentation/11/developing_an_application/use_data/download_a_file_through_browser/
Thanks
Deep
Hello ujwala T
if you have the file path and want to download the file using the Download widget, you can do the following steps:
Create a server action that returns the binary content of the file from the file path. You can use the FileReadBinary() function to read the binary content of the file.
Create a screen action in your Reactive Web Application and add a Download widget to it.
Set the Source property of the Download widget to the server action you created in step 1.
Set the FileName property of the Download widget to the name of the file you want to download.
Set the ContentType property of the Download widget to the appropriate MIME type for the file you are downloading.
On your screen, add a button or link and set the OnClick event to the action that triggers the Download widget.
When the user clicks the button or link, the Download widget will call the server action, get the binary content of the file, and initiate a download of the file with the specified file name and content type.
Hey,
Hope below link will help you.
https://stackoverflow.com/questions/3916191/download-data-url-file
Yogesh