Display Binary as download link

Certified Associate Developer

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.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    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).

Reply
  • 0
    Certified Lead Developer

    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).

Children