Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Hi, perhaps you could try removing the line "String recordId = field2" and check whether there is a "recordId" variable already automatically injected into the code.
Hi, I am doing a form with upload component and using bean shell script (Post Form Submission Processing) to save the uploaded file into db2 database.
But I encounter a problem that I could not get the actual path that store the uploaded file. The way how joget store the uploaded file is like UUID (folder name) like screenshot below:
I manage to get the file using FileUtil.getFile, below is the example code in bean shell script:
When I'm using jogetUploadFile.getAbsolutePath() or FileUtil.getUploadPath(tableName, recordId), it shows the path with upload component field id like below:
/home/jboss/wflow/app_formuploads/stao_form_filling_03/field2/download.PNG
But the actual path that store the uploaded file is like below:
/home/jboss/wflow/app_formuploads/stao_form_filling_03/192da6fe-a03214a4-2d8e94dd-7d54bfc0/download.PNG
I know that we should use primaryKeyValue to use getFile, but I don't how to get it in bean shell script (Post Form Submission Processing).
Gets the file from target upload directory of a form data record
Is there anyway to get actual file path (with UUID folder name) uploaded from joget in Bean shell script or get the primaryKeyValue in Bean shell script?
Thanks.