X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=frontend%2Fjs%2Fapp.js;h=dce3a602e43f42e8e487318d5b4c46977374be4d;hb=3df9f8a6fc959eaa0924722ad9ce0675d80369f9;hp=b68b6089cf5963831350d3ad0aa24179c2a1e7d7;hpb=19efa5bcdb745205ef5a6812480890968a17d1a9;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git diff --git a/frontend/js/app.js b/frontend/js/app.js index b68b608..dce3a60 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -136,6 +136,9 @@ function uploadFiles(files) { app.uploadStatus.percentDone = 0; asyncForEach(files, function (file, callback) { + // do not handle directories (file.type is empty in such a case) + if (file.type === '') return callback(); + var path = encode(sanitize(app.path + '/' + (file.webkitRelativePath || file.name))); var formData = new FormData();