summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-05-06 00:32:12 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-06 00:32:12 +0200
commit0c98146cb3f662cb83c44cb88cfbcf20c409f31f (patch)
tree5b8fe281fb1ce2e3faba0b368fcc2dfbec957304
parent263498346d6a8cc6c96396f6b658d344d5492078 (diff)
Fix upload_form file inputs in firefox
Selecting a file creates a new file input, but in firefox that new input will contains the same files as the one that was cloned so when the user hit upload the file will be uploaded twice. This does not affect chromium. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--data/js/uploader.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/js/uploader.js b/data/js/uploader.js
index 11ffc8d4a..0b3993eb0 100644
--- a/data/js/uploader.js
+++ b/data/js/uploader.js
@@ -50,7 +50,7 @@ define(['jquery', 'underscore'], function ($, _) {
appendUploadInput: function (event) {
if (_.any($(ui.uploadInputs), this.hasNoFiles)) { return; }
- $(event.target).parent().append($(event.target).clone(), $('<br>'));
+ $(event.target).parent().append($(event.target).clone().val(""), $('<br>'));
},
hasNoText: function (textArea) {