mirror of
https://github.com/UiO-Gaming/infoscreen3.git
synced 2026-11-05 13:56:52 +01:00
Fixes .jpeg images to show after upload
This commit is contained in:
1 parent
e7b5c0f115
commit
aec6d4b3d3
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user