I am using blueimp plugin to upload a file. It's working on local server but when I try to use a different domain file it doesn't save over there. Please help me with what I have to do. I have written the following code
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
xhrFields: {withCredentials: true},
url: 'http://192.168.1.205/EncoderService/API/Default.aspx'
});
// Enable iframe cross-domain access via redirect option:
$('#fileupload').fileupload(
'option',
'redirect',
window.location.href.replace(
/\/[^\/]*$/,
'/cors/result.html?%s'
)
);
Is there any need to write code in the server side or not?
When I set WithCrentials: false Its works for me.