Skip to main content
March 18, 2025
Question

Display Binary as download link

  • March 18, 2025
  • 7 replies
  • 0 views

Hello we have integration with an external system and once we add the document, we use Get file to retrieve the document.

In the Get File Integration if I use convert Binary to Appian document it works fine and stores the document in Appian.

But we do not want to store the document in Appian, we just want it to be a downloadable link. Converting the binary to a document using todocument() to display in a!documentDownloadLink.. results in an error saying ID Not found.

    7 replies

    mikes0011
    Brainy
    March 18, 2025

    Note if you have a valid Appian Document ID, the document is already stored within the Appian filesystem, and using todocument() on it is irrelevant.  Also there is no need to wrap the document ID in todocument() for use in a!documentDownloadLink, all that's required is a valid ID.

    If you're getting an "ID not found" error, your issue is something deeper, which you will need to address.  And there is no way to provide a download link without making a valid copy into Appian - if you don't want the file to persist, I suggest incorporating a timer in your process that handles the copy, which auto-deletes the downloaded document after some amount of time has passed (after which you can assume the user has had plenty of time to download a copy on-form).

    March 18, 2025

    Our use case is documents are stored in another content management system and when we view a record (like vendor/customer record) we only need to show links to the documents and clicking on the link should download the document from the external content management system. We cannot store document in Appian and delete since we do not know how long we need it for.

    mikes0011
    Brainy
    March 18, 2025

    Then your requirements seem to be in conflict with each other - you will need to decide which path you want to take, because you can not do both things at once.

    If you really can't store the document in Appian (even temporarily), then you won't be able to use Document Download Link at all, since it is only for documents stored in the Appian filesystem.  The best you'll be able to do is have Appian display a valid URL to download the document from its original (external) location.