mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fix(directory) upload files with help of dragndrop when root directory is empty (#145)
This commit is contained in:
parent
06e55831f1
commit
ed2cbfed65
1 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
|||
/* global CloudCmd */
|
||||
/* global DOM */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
@ -7,9 +6,13 @@ const philip = require('philip');
|
|||
|
||||
const Images = require('./images');
|
||||
const {FS} = require('../../common/cloudfunc');
|
||||
const DOM = require('.');
|
||||
|
||||
const {
|
||||
getCurrentDirPath: getPathWhenRootEmpty,
|
||||
} = DOM;
|
||||
|
||||
module.exports = (items) => {
|
||||
const Info = DOM.CurrentInfo;
|
||||
const Dialog = DOM.Dialog;
|
||||
|
||||
if (items.length)
|
||||
|
|
@ -19,7 +22,8 @@ module.exports = (items) => {
|
|||
return item.webkitGetAsEntry();
|
||||
});
|
||||
|
||||
const path = Info.dirPath
|
||||
const dirPath = getPathWhenRootEmpty();
|
||||
const path = dirPath
|
||||
.replace(/\/$/, '');
|
||||
|
||||
const uploader = philip(entries, (type, name, data, i, n, callback) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue