Commit 88fd757b authored by asseldonk's avatar asseldonk
Browse files

filebrowser: fixed error in multiple upload, fixed #2039

parent ef93f063
......@@ -237,7 +237,7 @@ class FSAjaxController(AbstractController):
parts = [parts]
path = kwargs['path']
filename = fs.handle_file_name_collision(parts[0].filename, path)
for part in parts:
append = False
force = True
......@@ -245,7 +245,7 @@ class FSAjaxController(AbstractController):
data = part.file.read(1024 * 1024)
if len(data) <= 0:
break
success, msg = fs.save_file_content(part.filename, data,
success, msg = fs.save_file_content(filename, data,
path=path, force=force,
append=append)
if not success:
......
......@@ -410,12 +410,12 @@ var FileBaseActions = Class.extend({
done: function() {
//self.FileBase.updateView();
vispa.messenger.info("Upload succeeded", "glyphicon glyphicon-ok-sign");
$(this).remove();
},
fail: function() {
vispa.messenger.info("Upload failed", "glyphicon glyphicon-warning-sign");
}
}).trigger("click");
return this;
},
filter: function() {
......
......@@ -479,6 +479,7 @@ class FileSystem(object):
def handle_file_name_collision(self, name, path):
# collision?
path = self.expand(path)
files = os.listdir(path)
if name not in files:
return name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment