]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - frontend/js/app.js
Support uploading whole folder trees
[perso/Immae/Projets/Nodejs/Surfer.git] / frontend / js / app.js
index 8970a0f8b6c3d379fa6fba545bbcc51cfdac931d..4cb57e3b1b35163d1c72c04cd5e07e78d08d75ff 100644 (file)
@@ -136,7 +136,7 @@ function uploadFiles(files) {
     app.uploadStatus.percentDone = 0;
 
     asyncForEach(files, function (file, callback) {
-        var path = encode(sanitize(app.path + '/' + file.name));
+        var path = encode(sanitize(app.path + '/' + (file.webkitRelativePath || file.name)));
 
         var formData = new FormData();
         formData.append('file', file);