Fixes .jpeg images to show after upload

This commit is contained in:
Reaby committed 2022-11-16 21:06:54 +02:00
1 parent e7b5c0f115
commit aec6d4b3d3
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -260,7 +260,7 @@ export default function (pluginManager, websocket, dispatcher) {
let output = [];
for (let file of bundleImages) {
if (file.match(/(.*\.png)|(.*\.jpg)/i)) {
if (file.match(/(.*\.png)|(.*\.jpg)|(.*\.jpeg)/i)) {
output.push({
url: "/images/" + bundle + "/" + file,
name: file
+2 -2
View File
@@ -313,9 +313,9 @@
on: {
load: function (e, file) {
// check file type
var imageType = /image.(jpeg|png)/;
var imageType = /image.(jpeg|jpg|png)/;
if (!file.type.match(imageType)) {
// alert("File \"" + file.name + "\" is not a valid image file, only jpeg and png are supported");
alert("File \"" + file.name + "\" is not a valid image file, only jpeg and png are supported");
return false;
}