From: Johannes Zellner Date: Fri, 18 May 2018 19:07:53 +0000 (+0200) Subject: Support uploading whole folder trees X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git;a=commitdiff_plain;h=35355283872739fb9bd150cf42a40a1a23b1674d Support uploading whole folder trees --- diff --git a/frontend/index.html b/frontend/index.html index 5856a16..538d329 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -21,7 +21,7 @@
- + diff --git a/frontend/js/app.js b/frontend/js/app.js index 8970a0f..4cb57e3 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -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);