diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/widget/ImageUpload.java b/src/main/java/ch/ethz/seb/sebserver/gui/widget/ImageUpload.java index d78ef7ae..fa6015df 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/widget/ImageUpload.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/widget/ImageUpload.java @@ -49,7 +49,9 @@ public final class ImageUpload extends Composite { private static final Logger log = LoggerFactory.getLogger(ImageUpload.class); public static final Set SUPPORTED_IMAGE_FILES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList( - ".png"))); + ".png", + ".jpg", + ".jpeg"))); private final ServerPushService serverPushService; @@ -211,7 +213,7 @@ public final class ImageUpload extends Composite { private static boolean fileSupported(final String fileName) { return SUPPORTED_IMAGE_FILES .stream() - .filter(fileType -> fileName.endsWith(fileType)) + .filter(fileType -> fileName.toUpperCase().endsWith(fileType.toUpperCase())) .findFirst() .isPresent(); } diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index d696c172..6dd3bb67 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -129,7 +129,7 @@ sebserver.institution.form.title=Institution sebserver.institution.form.name=Name sebserver.institution.form.urlSuffix=URL Suffix sebserver.institution.form.logoImage=Logo Image -sebserver.institution.form.logoImage.unsupportedFileType=The selected file is not or an unsupported image type +sebserver.institution.form.logoImage.unsupportedFileType=The selected file is not supported. Supported are: PNG and JPG ################################