Download a Document from s3 using webservice call

 We are trying to integrate appian with an internal Java application . The design is going on .   The Java application is responsible for connecting to s3 and providing us the document using a webservice call . We will call the API provided by Java application with a document ID . we will get the document as result of this call . we should be able to download the document to our desktop 

Please let me know if anyone worked on this type of requirements . I would like to know whether this is even possible with Appian 

  Discussion posts and replies are publicly visible

Parents
  • I accomplished similar requirement using Servlet plug-in.

    From Appian UI, you can create a link to the Servlet with document unique identifier in the URI (as query parameter). When the user clicked on the link to the Servlet, your Java code do all these works in one go: call S3 service to download the file into temporary directory, determine file type to set the correct content type of the file, send the file content to the browser, delete the temporary file.

    There are a few gotchas along the way, but your Java developers should be able to handle them. Let me know if you want to go this route, and have further questions.
  • 0
    A Score Level 3
    in reply to rawich
    Seems like you could use a Web API for it then too?
  • @bene, it may be possible, but there are many challenges with using Web API for this requirement.  

    There is a Shared Component "Amazon S3 Utilities" available as Smart Service plug-in. With that, you can download a file from Amazon S3 into Appian document.
    Challenge #1 - You have to call the Smart Service by starting a new process, but you won't know when the the file is ready, and you can't wait either. 

    If you got through that hurdle, you can try to extract Appian document download URL from a deprecated function linktodocument(), then redirect the browser to download the document.  But yes, it's deprecated, so this solution will only be temporary.

    There is also a concern about cleaning up, after the file is downloaded.

    I can imagine a quick and dirty proof-of-concept can be implemented using Web API, but not as a production ready solution.

Reply
  • @bene, it may be possible, but there are many challenges with using Web API for this requirement.  

    There is a Shared Component "Amazon S3 Utilities" available as Smart Service plug-in. With that, you can download a file from Amazon S3 into Appian document.
    Challenge #1 - You have to call the Smart Service by starting a new process, but you won't know when the the file is ready, and you can't wait either. 

    If you got through that hurdle, you can try to extract Appian document download URL from a deprecated function linktodocument(), then redirect the browser to download the document.  But yes, it's deprecated, so this solution will only be temporary.

    There is also a concern about cleaning up, after the file is downloaded.

    I can imagine a quick and dirty proof-of-concept can be implemented using Web API, but not as a production ready solution.

Children