Merged r13404 from trunk to 2.5-stable (#17581)

stricter check of uploading attachments.

Contributed by fred bregar.

git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13405 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2014-09-14 14:13:32 +00:00
parent 198e92d26b
commit c6461536e4

View 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();