mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Merge pull request #435 from gregh3269/master
[WW-5088] Empty file upload, storeLocation null gives wrong error message.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user