]> 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 92dc1defd6b804183a2140583fe6a0ac77140e0c..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);
@@ -275,9 +275,7 @@ var app = new Vue({
 
                     refresh();
                 });
-            }).catch(function () {
-                console.log('delete error:', arguments);
-            });
+            }).catch(function () {});
         },
         onRename: function (entry) {
             var that = this;
@@ -294,9 +292,7 @@ var app = new Vue({
 
                     refresh();
                 });
-            }).catch(function (error) {
-                that.$message.error(error.message);
-            });
+            }).catch(function () {});
         },
         onNewFolder: function () {
             var that = this;
@@ -314,9 +310,7 @@ var app = new Vue({
 
                     refresh();
                 });
-            }).catch(function (error) {
-                that.$message.error(error.message);
-            });
+            }).catch(function () {});
         },
         prettyDate: function (row, column, cellValue, index) {
             var date = new Date(cellValue),