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);
|
FileItem file = list.get(0);
|
||||||
if (file.getSize() == 0) {
|
if (file.getSize() == 0) {
|
||||||
throw new UserMistakeException("No file was uploaded in '"
|
throw new UserMistakeException("Please browse and select a photo.");
|
||||||
+ PARAMETER_UPLOADED_FILE + "'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String filename = getSimpleFilename(file);
|
String filename = getSimpleFilename(file);
|
||||||
String mimeType = getMimeType(file);
|
String mimeType = getMimeType(file);
|
||||||
if (!RECOGNIZED_FILE_TYPES.containsValue(mimeType)) {
|
if (!RECOGNIZED_FILE_TYPES.containsValue(mimeType)) {
|
||||||
throw new UserMistakeException("'" + filename
|
throw new UserMistakeException("'" + filename
|
||||||
+ "' is not a recognized image file type. "
|
+ "' is not a recognized image file type. Please upload JPEG, GIF, or PNG files only.");
|
||||||
+ "These are the recognized types: "
|
|
||||||
+ RECOGNIZED_FILE_TYPES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
|
|
Loading…
Add table
Reference in a new issue