SEBSERV-36 fixed. supported files are PNG and JPG/JPEG
This commit is contained in:
parent
d94ec3b391
commit
b4c58bce81
2 changed files with 5 additions and 3 deletions
|
@ -49,7 +49,9 @@ public final class ImageUpload extends Composite {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ImageUpload.class);
|
private static final Logger log = LoggerFactory.getLogger(ImageUpload.class);
|
||||||
|
|
||||||
public static final Set<String> SUPPORTED_IMAGE_FILES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
|
public static final Set<String> SUPPORTED_IMAGE_FILES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
|
||||||
".png")));
|
".png",
|
||||||
|
".jpg",
|
||||||
|
".jpeg")));
|
||||||
|
|
||||||
private final ServerPushService serverPushService;
|
private final ServerPushService serverPushService;
|
||||||
|
|
||||||
|
@ -211,7 +213,7 @@ public final class ImageUpload extends Composite {
|
||||||
private static boolean fileSupported(final String fileName) {
|
private static boolean fileSupported(final String fileName) {
|
||||||
return SUPPORTED_IMAGE_FILES
|
return SUPPORTED_IMAGE_FILES
|
||||||
.stream()
|
.stream()
|
||||||
.filter(fileType -> fileName.endsWith(fileType))
|
.filter(fileType -> fileName.toUpperCase().endsWith(fileType.toUpperCase()))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.isPresent();
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ sebserver.institution.form.title=Institution
|
||||||
sebserver.institution.form.name=Name
|
sebserver.institution.form.name=Name
|
||||||
sebserver.institution.form.urlSuffix=URL Suffix
|
sebserver.institution.form.urlSuffix=URL Suffix
|
||||||
sebserver.institution.form.logoImage=Logo Image
|
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
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
Loading…
Reference in a new issue