1
0
-1

Hi team,

I have simple form with "file upload" filed. I am using plugin as "Post Form Submission Processing". 

Requirement: I have to read file upload on form in plugin for further processing on file by plugin. Any suggestion in best possible approach to read file inside Joget Plugin from form? 


Appreciate suggestions. 

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hello, 

      About upload a file Joget works like that. When the form upload a file, this is stored temporality on TempDir (defined on configuration by default is on <<Joget Installation>>/wflow/app_tempfile). When the form is submitted is moved to UploadDir (defined on configuration by default is on <<Joget Installation>>/wflow/app_formuploads).


      Now, in the plugin code you can access to the temporal files using FormRowSet ou FormRow (I don't remember which one) with .getTempFilePathMap()


      I think with that you can read the files that you need.


      I hope that helps you 


      1. A. Chaudhary

        Thank you Angel PEREZ , accessing these locations was ended up in 404 (possibly due to credentials required again by plugin). 

        Although code sample at "FileUtil - Knowledge Base for DX 7 - Joget | COMMUNITY" help to fix my issue. 

        By the way, how to clean files from location you mentioned? Is there any retention policy followed by Joget? Appreciate any suggestions. 

        <<Joget Installation>>/wflow/app_tempfile) and
        <<Joget Installation>>/wflow/app_formuploads 

        Best Regards






      CommentAdd your comment...