How to change file name in service export directory during upload
We are allowing end-users to upload documents to their cases, we have now had several instances where users end up with documents uploaded by other users (the documents have the same filename).
All attachments which are being uploaded through pzMultiFilePath are retained forever in service export directory as system is not deleting the files once upload operation is completed .
In Pega 7.3.1 version I see the false is being set to uploadFile function which is keeping the files in service export directory forever. .
java.util.HashMap hmFileInfo = pega_rules_utilities.uploadFile(false);
As per observation ,if two files with same name(only alphabets) then system keep the latest file and old file gets overwritten by latest file . But if the file name contains non-alphanumeric characters then PRPC is encoding special characters in file name while writing it to Service Export directory when uploading any file using OOTB FilePath control and somehow this ending up with duplicate files in service export directory and it's leading to customer documents are attached to wrong case.
1) Is there any specific reason to retain the files in export directory in Pega 7.3.1 .Can we pass the flag as true to Uploadfile function ?
2) Is it possible to append some unique attribute ( Caseid / timestamp) to file name before it gets uploaded into service export directory.
Keep up to date on this post and subscribe to comments
- Upload file to directory other than Service Export
- How to upload csv file to service export directory
- File upload to service export directory
- How to upload excel file from Windows local machine into service export directory
- we have a file listener working on the service export directory now our requiremnt is read each.xml file from the directory.