From 3df9f8a6fc959eaa0924722ad9ce0675d80369f9 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 18 May 2018 21:12:50 +0200 Subject: [PATCH] Do not error if a user tries to upload a file without a type --- frontend/js/app.js | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.41.0