]> source.dussan.org Git - redmine.git/commitdiff
Merged r13184 from trunk to 2.5-stable (#13932)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 Jun 2014 17:40:11 +0000 (17:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 25 Jun 2014 17:40:11 +0000 (17:40 +0000)
Fix file upload does not work with Safari.

Contributed by Felix Schäfer.

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

public/javascripts/attachments.js

index ab9f89a56ddcf155060f7fc546b5ed003fe56a24..a689c2ef3e343f02feed514228a65aa97019db5c 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();