]> source.dussan.org Git - redmine.git/commitdiff
fix file upload does not work with Safari (#13932)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 Jun 2014 13:34:51 +0000 (13:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 Jun 2014 13:34:51 +0000 (13:34 +0000)
Contributed by Felix Schäfer.

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

public/javascripts/attachments.js

index 2cfbe8398efc51a2a958ca83518fbf7b8e2eb69b..43803ba9c9e62428779c812b4b2818b6f84853ef 100644 (file)
@@ -117,7 +117,7 @@ function uploadBlob(blob, uploadUrl, attachmentId, options) {
 function addInputFiles(inputEl) {
   var clearedFileInput = $(inputEl).clone().val('');
 
-  if (inputEl.files) {
+  if ('FileReader' in window && inputEl.files) {
     // upload files using ajax
     uploadAndAttachFiles(inputEl.files, inputEl);
     $(inputEl).remove();