Merge pull request #435 from gregh3269/master

[WW-5088] Empty file upload, storeLocation null gives wrong error message.
This commit is contained in:
Lukasz Lenart
2020-09-07 09:23:17 +02:00
committed by GitHub
@@ -342,6 +342,14 @@ public class FileUploadInterceptor extends AbstractInterceptor {
validation.addFieldError(inputName, errMsg);
}
if (LOG.isWarnEnabled()) {
LOG.warn(errMsg);
}
} else if (file.getContent() == null) {
String errMsg = getTextMessage(action, "struts.messages.error.uploading", new String[]{filename});
if (validation != null) {
validation.addFieldError(inputName, errMsg);
}
if (LOG.isWarnEnabled()) {
LOG.warn(errMsg);
}