mirror of
https://github.com/unraid/webgui.git
synced 2026-01-17 07:00:10 -06:00
Allow different image types to upload with 512K max
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user