API that returns document - changing document extension

Certified Lead Developer

We have an integration object that calls an API that returns a document. So far we only needed PDF so we hardcoded the extension to .PDF. Now we can also receive a TXT file that contains JSON data in it. What is the best way for us to dynamically set the extension depending on the document that we receive? The integration team added the Content-Type to the HTTP headers but when I remove the .pdf, the document extension is set by Appian to .bin. (The txt file is getting set to .json) Any recommendations on how to best implement this?

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data