|
@@ -1115,6 +1115,23 @@ export class DirListing extends Widget {
|
|
if (!files || files.length === 0) {
|
|
if (!files || files.length === 0) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ const length = event.dataTransfer?.items.length;
|
|
|
|
+ if (!length) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
|
+ let entry = event.dataTransfer?.items[i].webkitGetAsEntry();
|
|
|
|
+ if (entry.isDirectory) {
|
|
|
|
+ console.log('currently not supporting drag + drop for folders');
|
|
|
|
+ void showDialog({
|
|
|
|
+ title: this._trans.__('Error Uploading Folder'),
|
|
|
|
+ body: this._trans.__(
|
|
|
|
+ 'Drag and Drop is currently not supported for folders'
|
|
|
|
+ ),
|
|
|
|
+ buttons: [Dialog.cancelButton({ label: this._trans.__('Close') })]
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
for (let i = 0; i < files.length; i++) {
|
|
for (let i = 0; i < files.length; i++) {
|
|
void this._model.upload(files[i]);
|
|
void this._model.upload(files[i]);
|