diff --git a/lib/client/dom.js b/lib/client/dom.js index 04fa0f61..77814679 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -405,7 +405,14 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; }; this.uploadFiles = function(files) { - var func = CloudCmd.refresh, + var func = function(name) { + return function() { + CloudCmd.refresh(null, function() { + var current = DOM.getCurrentFileByName(name); + DOM.setCurrentFile(current); + }); + }; + }, dir = CurrentInfo.dirPath, load = function(file, callback) { var Images = DOM.Images, @@ -422,7 +429,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; if (files.length) { Util.forEach(files, function(file) { - func = Util.exec.with(load, file, func); + func = Util.exec.with(load, file, func(file.name)); }); func();