NIHVIVO-577: Improved error message copy
This commit is contained in:
parent
ecd92ad5d6
commit
703a812cd5
1 changed files with 2 additions and 5 deletions
|
@ -111,17 +111,14 @@ public class ImageUploadHelper {
|
|||
|
||||
FileItem file = list.get(0);
|
||||
if (file.getSize() == 0) {
|
||||
throw new UserMistakeException("No file was uploaded in '"
|
||||
+ PARAMETER_UPLOADED_FILE + "'");
|
||||
throw new UserMistakeException("Please browse and select a photo.");
|
||||
}
|
||||
|
||||
String filename = getSimpleFilename(file);
|
||||
String mimeType = getMimeType(file);
|
||||
if (!RECOGNIZED_FILE_TYPES.containsValue(mimeType)) {
|
||||
throw new UserMistakeException("'" + filename
|
||||
+ "' is not a recognized image file type. "
|
||||
+ "These are the recognized types: "
|
||||
+ RECOGNIZED_FILE_TYPES);
|
||||
+ "' is not a recognized image file type. Please upload JPEG, GIF, or PNG files only.");
|
||||
}
|
||||
|
||||
return file;
|
||||
|
|
Loading…
Add table
Reference in a new issue