NIHVIVO-577: Improved error message copy

This commit is contained in:
mb863 2010-07-13 14:42:07 +00:00
parent ecd92ad5d6
commit 703a812cd5

View file

@ -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;