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

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
This commit is contained in:
Toshi MARUYAMA
2014-09-14 14:14:44 +00:00
parent 5286e194d5
commit 62e4b9f385

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