@@ -52,7 +52,9 @@ import {
52
52
/**
53
53
* flag indicating whether uploading folders is supported
54
54
*/
55
- const supportsUploadingFolders = ! ! ( window . DataTransferItem && DataTransferItem . prototype . webkitGetAsEntry ) ;
55
+ const supportsUploadingFolders = core =>
56
+ core . config ( 'filemanager.disableMultiUpload' , false ) !== true
57
+ && ! ! ( window . DataTransferItem && DataTransferItem . prototype . webkitGetAsEntry ) ;
56
58
57
59
/**
58
60
* Creates default settings
@@ -73,7 +75,7 @@ const createWindowOptions = (core, proc, title) => ({
73
75
mediaQueries : {
74
76
small : 'screen and (max-width: 400px)'
75
77
} ,
76
- droppable : { dataTransferProperty : supportsUploadingFolders ? 'items' : 'files' } ,
78
+ droppable : { dataTransferProperty : supportsUploadingFolders ( core ) ? 'items' : 'files' } ,
77
79
} ,
78
80
dimension : Object . assign ( {
79
81
width : 400 ,
@@ -416,7 +418,7 @@ const vfsActionFactory = (core, proc, win, dialog, state) => {
416
418
} ;
417
419
418
420
const uploadBrowserFiles = async ( items ) => {
419
- if ( ! supportsUploadingFolders ) {
421
+ if ( ! supportsUploadingFolders ( core ) ) {
420
422
return legacyUploadBrowserFiles ( items ) ;
421
423
}
422
424
@@ -592,7 +594,7 @@ const dialogFactory = (core, proc, win) => {
592
594
593
595
const progressDialog = ( name , cb = ( ( ) => { } ) ) => dialog ( 'progress' , {
594
596
message : __ ( 'DIALOG_PROGRESS_MESSAGE' , name ) ,
595
- buttons : [ ]
597
+ buttons : [ 'Cancel' ]
596
598
} , cb , false ) ;
597
599
598
600
const errorDialog = ( error , message ) => dialog ( 'alert' , {
0 commit comments