How we can display uploaded file in an interface?

How we can display uploaded file in an interface?

  Discussion posts and replies are publicly visible

Parents
  • Hello,

    In the component a!fileUploadField(), you have two fields fileName & target , where you can name the files uploaded in a particular naming pattern and store the file in a folder respectively.Using that name pattern you can access any file uploaded after it is submitted using the below code. However this only works when we submit the file as displaying the uploaded file is only possible when it is submitted and an id is created.

    ri!docName : rule input to store document.

    cons!THETARGETFOLDERCONSTANT : constant which stores the target folder.

    a!richTextItem(
    text: " Download",
    style: "STRONG",
    link: a!documentDownloadLink(
    label: "Download",
    document: todocument(
    folder(findcontentbyattribute(
    false,
    "document",
    "name",
    ri!docName,
    cons!THETARGETFOLDERCONSTANT
    ),"id")
    )
    )
    )

    Hope this helps .

    regards,
    Abhishek Gaddam.
Reply
  • Hello,

    In the component a!fileUploadField(), you have two fields fileName & target , where you can name the files uploaded in a particular naming pattern and store the file in a folder respectively.Using that name pattern you can access any file uploaded after it is submitted using the below code. However this only works when we submit the file as displaying the uploaded file is only possible when it is submitted and an id is created.

    ri!docName : rule input to store document.

    cons!THETARGETFOLDERCONSTANT : constant which stores the target folder.

    a!richTextItem(
    text: " Download",
    style: "STRONG",
    link: a!documentDownloadLink(
    label: "Download",
    document: todocument(
    folder(findcontentbyattribute(
    false,
    "document",
    "name",
    ri!docName,
    cons!THETARGETFOLDERCONSTANT
    ),"id")
    )
    )
    )

    Hope this helps .

    regards,
    Abhishek Gaddam.
Children
No Data