82
rated 0 times
[
89]
[
7]
/ answers: 1 / hits: 18978
/ 8 Years ago, tue, august 30, 2016, 12:00:00
I'd want to send a FormData
by using jQuery AJAX, like:
var uploadFormData = new FormData();
uploadFormData.append(name,value);
$.ajax({
url : (URL_target),
type : POST,
data : uploadFormData,
cache : false,
contentType : false,
processData : false,
success : function(r) {
alert(Success!);
}
});
But I also want to send a binary data by using jQuery AJAX, like:
var data = (...);
$.ajax({
url: (URL_target),
type: POST,
data : data,
cache : false,
contentType: application/octet-stream,
processData: false,
success : function(r) {
alert(Success!);
}
});
How can I combine them into one data and send it out?
More From » jquery