]> source.dussan.org Git - redmine.git/commitdiff
stricter check of uploading attachments (#17581)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 14 Sep 2014 13:44:24 +0000 (13:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 14 Sep 2014 13:44:24 +0000 (13:44 +0000)
Contributed by fred bregar.

git-svn-id: http://svn.redmine.org/redmine/trunk@13404 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/attachments.js

index 229235f831610b998edb683acc738e34f75c2a25..f80098665ff989592f1d27d0e76645fca5ff30bc 100644 (file)
@@ -119,7 +119,7 @@ function uploadBlob(blob, uploadUrl, attachmentId, options) {
 function addInputFiles(inputEl) {
   var clearedFileInput = $(inputEl).clone().val('');
 
-  if (inputEl.files) {
+  if ($.ajaxSettings.xhr().upload && inputEl.files) {
     // upload files using ajax
     uploadAndAttachFiles(inputEl.files, inputEl);
     $(inputEl).remove();