##// END OF EJS Templates
fix Drag & Drop does not work with Safari 5.1 (#17581, #13932)...
Toshi MARUYAMA -
r12992:425761740a65
parent child
Show More
@@ -99,8 +99,10 function uploadBlob(blob, uploadUrl, attachmentId, options) {
99 99 return $.ajax(uploadUrl, {
100 100 type: 'POST',
101 101 contentType: 'application/octet-stream',
102 beforeSend: function(jqXhr) {
102 beforeSend: function(jqXhr, settings) {
103 103 jqXhr.setRequestHeader('Accept', 'application/js');
104 // attach proper File object
105 settings.data = blob;
104 106 },
105 107 xhr: function() {
106 108 var xhr = $.ajaxSettings.xhr();
@@ -117,7 +119,7 function uploadBlob(blob, uploadUrl, attachmentId, options) {
117 119 function addInputFiles(inputEl) {
118 120 var clearedFileInput = $(inputEl).clone().val('');
119 121
120 if ('FileReader' in window && inputEl.files) {
122 if (inputEl.files) {
121 123 // upload files using ajax
122 124 uploadAndAttachFiles(inputEl.files, inputEl);
123 125 $(inputEl).remove();
General Comments 0
You need to be logged in to leave comments. Login now