0

I am trying to upload images using file-uploader jquery plugin. But i am getting "Cross-Origin Request Blocked" and not getting any response. Here is one thing my file is place on another server and my ajax url is different

Please check below my code:-

var url = 'mysite/upload.php';
$('#fileupload').fileupload({
    url: url,
    dataType: 'json',
    done: function (e, data) {
    alert(data)
    }

});

Please update me how this will fix.

Addy
  • 998
  • 4
  • 12
  • 36
  • Possible duplicate of [How to get a cross-origin resource sharing (CORS) post request working](http://stackoverflow.com/questions/5750696/how-to-get-a-cross-origin-resource-sharing-cors-post-request-working) – Script47 Aug 16 '16 at 14:11
  • Your URL looks funny. Are you sure the `,php` isn't a typo? – apokryfos Aug 16 '16 at 14:14
  • Read about [CORS](http://techblog.constantcontact.com/software-development/using-cors-for-cross-domain-ajax-requests/) – jacqbus Aug 16 '16 at 14:15

0 Answers0