Skip to content

Commit

Permalink
fixed issue with attachments file extensions being stripped off
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Oct 24, 2024
1 parent 8a3aed3 commit 7f22a7d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,9 @@ private boolean saveToCase(Message msg, Date received, ArchiveFileBean toCase, A

// remove any extension, because of the template it might be somewhere in the middle of the new name
docName = docName.replace("." + extension, "");

// add back extension
docName = ServerFileUtils.preserveExtension(newName, docName);

if (caseSvc.doesDocumentExistUnrestricted(toCase.getId(), docName)) {
log.error("There is already a document '" + docName + "' in case " + toCase.getFileNumber() + " - skipping this attachment");
Expand Down

0 comments on commit 7f22a7d

Please sign in to comment.