From 1763cf72d11899f76b73868f61d54e3d22abce85 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 29 Jun 2017 16:24:12 +0200 Subject: [PATCH] tell anonymous users they can't upload --- www/common/common-file.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/common/common-file.js b/www/common/common-file.js index 92456a4a1..a698f5b49 100644 --- a/www/common/common-file.js +++ b/www/common/common-file.js @@ -242,6 +242,10 @@ define([ }; var onFileDrop = File.onFileDrop = function (file, e) { + if (!common.isLoggedIn()) { + return common.alert(common.Messages.upload_mustLogin); + } + Array.prototype.slice.call(file).forEach(function (d) { handleFile(d, e); }); @@ -273,6 +277,7 @@ define([ }) .on('drop', function (e) { e.stopPropagation(); + var dropped = e.originalEvent.dataTransfer.files; counter = 0; $hoverArea.removeClass('hovering');