i am Trying to upload image to some External URL. I am getting Cross-Origin Request Blocked in the console. My response contains complete JSON data.
I have got a form with enctype="multipart/form-data". And this is my ajax
$.ajax({
url: 'externalURL/image/upload'
type: 'POST',
cache: false,
processData:false,
crossDomain: true,
dataType : 'jsonp',
jsonpCallback: 'jsonCallback',
data: $("#multiform").serialize(),
beforeSend: function (xhr)
{
xhr.setRequestHeader("Content-Type","application/json");
xhr.setRequestHeader("Accept","text/json");
},
error: function (xhr, status) {
alert(status);
},
success: function (result) {
alert(result);
}
});
I am getting error alert , when i try to upload.