directly download file from DB

Hi All,
I need to download from DB a PDF tha is stores as Base64 format
I would like to do that directly in SAIL to allow to our users to dwnload directly from the interface this document
How can I do that , is there a method ?
Thanks
Elia

  Discussion posts and replies are publicly visible

Parents
  • I have to receive many files from another system and to show them on demand , when the user need.
    If I load these files by a process, as document variable type, the risk is the process can consume a large amount of RAM
    If I have many of these instances they can slow down the whole system ...more, they stay in memory until an engines restart happens (if the instances are terminated), so a SAIL "direct download" approach if the only way I can see...
  • 0
    Certified Lead Developer
    in reply to eliav
    You have to factor in how big are the documents and how frequent they are downloaded.

    Both approaches have it's advantages. If immediate/on-the-fly download is not a required, I recommend via process approach. The process can be delete/archived immediately after moving the document to Appian collab.

    Direct download takes up RAM temporarily. The way the direct download works is the servlet takes document/sql parameters and retrieve and loads base64 string to RAM (JAVA heap), convert it to document stream output.
Reply
  • 0
    Certified Lead Developer
    in reply to eliav
    You have to factor in how big are the documents and how frequent they are downloaded.

    Both approaches have it's advantages. If immediate/on-the-fly download is not a required, I recommend via process approach. The process can be delete/archived immediately after moving the document to Appian collab.

    Direct download takes up RAM temporarily. The way the direct download works is the servlet takes document/sql parameters and retrieve and loads base64 string to RAM (JAVA heap), convert it to document stream output.
Children
No Data