]> source.dussan.org Git - redmine.git/commitdiff
Merged r13404 from trunk to 2.4-stable (#17581)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 14 Sep 2014 14:14:44 +0000 (14:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 14 Sep 2014 14:14:44 +0000 (14:14 +0000)
stricter check of uploading attachments.

Contributed by fred bregar.

git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@13406 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/attachments.js

index a67ca4a722b60cf6fb354983958699e54133b3ae..318c3c03f3aaa3f650b249808fce049feced1926 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();