public void setAttachmentFilenamesUpload( FormFile file) { // ummm... we dont actually allow this anyhow read-only! FormFileElement ffe = getFormFileElement(ATTACHMENT_FILENAMES_FIELDNAME, true); if (ffe != null) { // 20030801AH - WHY is this block here? Attachments is a multiple file field. Even tif it was // editable why would you want to name all files the same sa the first one? file.setFileName(ffe.getFileName()); } addFileToField(ATTACHMENT_FILENAMES_FIELDNAME, file); }
public void setUdocFilenameUpload(FormFile file) { // 20030731AH String fileName = file.getFileName(); FormFileElement ffe = getFormFileElement(FILE_FIELDNAME, true); if (ffe != null) fileName = ffe.getFileName(); if (addFileToField(FILE_FIELDNAME, file)) { ffe = getFormFileElement(FILE_FIELDNAME, file); if (!ffe.getFileName().equals(fileName)) { ffe.setTransferAs(fileName); } } }