mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-25 01:41:14 +00:00
Contributed by fred bregar. git-svn-id: http://svn.redmine.org/redmine/trunk@13346 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
64255dc663
commit
425761740a
@ -99,8 +99,10 @@ function uploadBlob(blob, uploadUrl, attachmentId, options) {
|
||||
return $.ajax(uploadUrl, {
|
||||
type: 'POST',
|
||||
contentType: 'application/octet-stream',
|
||||
beforeSend: function(jqXhr) {
|
||||
beforeSend: function(jqXhr, settings) {
|
||||
jqXhr.setRequestHeader('Accept', 'application/js');
|
||||
// attach proper File object
|
||||
settings.data = blob;
|
||||
},
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
@ -117,7 +119,7 @@ function uploadBlob(blob, uploadUrl, attachmentId, options) {
|
||||
function addInputFiles(inputEl) {
|
||||
var clearedFileInput = $(inputEl).clone().val('');
|
||||
|
||||
if ('FileReader' in window && inputEl.files) {
|
||||
if (inputEl.files) {
|
||||
// upload files using ajax
|
||||
uploadAndAttachFiles(inputEl.files, inputEl);
|
||||
$(inputEl).remove();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user