Allow different image types to upload with 512K max

This commit is contained in:
bergware
2020-06-20 11:17:45 +02:00
parent 7b5453fdab
commit e174464369
3 changed files with 3 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ $(function() {
data: {"csrf_token": "<?=$var['csrf_token']?>"},
url:'/webGui/include/FileUpload.php',
beforeEach:function(file) {
if (!file.type.match(/^image\/*/)) {
if (!file.type.match(/^image\/.*/)) {
swal({title:"_(Warning)_",text:"_(Only PNG images are allowed)_!",type:"warning",confirmButtonText:"_(Ok)_"});
return false;
}

View File

@@ -111,7 +111,7 @@ $(function(){
url:'/webGui/include/FileUpload.php',
data:{path:path,"csrf_token":"<?=$var['csrf_token']?>"},
beforeEach:function(file) {
if (!file.type.match(/^image\/*/)) {
if (!file.type.match(/^image\/.*/)) {
swal({title:"Warning",text:"Only PNG images are allowed!",type:"warning",confirmButtonText:"_(Ok)_"});
return false;
}

View File

@@ -119,7 +119,7 @@ $(function(){
url:'/webGui/include/FileUpload.php',
data:{"csrf_token":"<?=$var['csrf_token']?>"},
beforeEach:function(file) {
if (!file.type.match(/^image\/*/)) {
if (!file.type.match(/^image\/.*/)) {
swal({title:"Warning",text:"_(Only PNG images are allowed)_!",type:"warning",confirmButtonText:"_(Ok)_"});
return false;
}