Can we download document just after uploading it?

Hi,

In a case, I have to upload document through a!fileUploadField() and on the same page need to show a download link, so that user can see what document, he has uploaded.
if we click on "save as draft" button and come to same page then I can download document. but without click on any button download link is not working. is it possible to download document just after upload without submit button?

OriginalPostID-251409

  Discussion posts and replies are publicly visible

  • Hi Vivek. Unfortunately I'm not aware of a way that you can do what you describe. One way to make the work-around you described seem more user-friendly is to make the "save as draft" submit button say, "Upload" instead. Even though it is a submit button, when the flow is redirected to the same page from the user's perspective he has never left the page. He will see the Upload button as a part of the document upload process rather than thinking he has left the page and returned to it. Hope this helps.
  • 0
    Certified Lead Developer
    Hi Vivek,

    AFAIK you cannot generate link for a document after uploading it, as it won't be available in Appian completely at that point of time. It gets placed in a temporary storage location but not in the target folder which was mentioned in the a!fileUploadField(). Only after the FOrm submission, the document will be moved to the target location with a proper UUID and Id. Only then we can give a download link to the document.

    Work around for this will be having two user input tasks one chained together one for showing the contents of document and links two download and the second will be used for uploading the documents. This makes the end user to think that he is working on the same page the only drawback is that the end user need to do more interaction with the form.