Skip to main content
November 6, 2023
Question

file upload

  • November 6, 2023
  • 6 replies
  • 0 views

how we can fetch the document extension name and document type in when we upload something on UI

    6 replies

    stefanhelzle0001
    Brainy
    November 6, 2023

    Not. You do that in the process model.

    jordand0005
    November 6, 2023

    Unfortunately not possible - see full documentation here: https://docs.appian.com/suite/help/23.3/File_Upload_Component.html#uploaded-files-are-stored-as-temporary-documents-until-submission

    "When a file is uploaded, the component updates with a temporary document representing the uploaded file. Between the upload and the submission, the file on the server is an inactive temporary file and not accessible except through fv! variables described in the File NameFile Description, and Validations parameters. This is the only way to access file metadata before the file upload is submitted."

    mikes0011
    Brainy
    November 6, 2023

    Sounds like you should go to my old long-standing Feature Request and click "like" on it, and add a comment in support to amplify it and float it back to the top of Community for greater visibility.  As far as I know, this is in Appian's "product enhancement backlog swamp" along with tons of other useful quality-of-life tweaks, to my chagrin.

    I will let you in on the lesser-known fact, though, that the "get content object details by ID" function from the Content Details plug-in, CAN be fed a Doc ID and WILL return a text string containing the (full, un-parsed) filename, even for "newly uploaded but not yet submitted" documents.  With a bit of work, this is a supported workaround that can help with your use case, though you must do it carefully and anyone who attempts this should first have a thorough understanding of how Expression Rules work in general.

    The Expression Guru
    November 7, 2023

    Hi deeptis0004,

    Whatever I could understand from your question,  we can use document() function to fetch the extension, type or properties of uploaded document. Thanks

    mikes0011
    Brainy
    November 9, 2023
    we can use document() function

    document() is unable to access a newly-uploaded file at all - in fact it will crash and show the user an error.  This is why I shared the work-around approach I detailed above.

    The Expression Guru
    rahuls1280
    November 10, 2023

    Can you please elaborate what is you requirement!!