[Answer]-Submitting files to django server from outside via Ajax

1👍

You have to tell $.ajax not to set a content type otherwise it will be set incorrectly

$.ajax({
   url: THIRD_SERVER + 'test_binary',
   type: 'POST',       
   data: form,
   processData: false,
   contentType: false,
   success: function(data){
      console.log('test_binary ' + JSON.stringify(data));
   }
});
👤Musa

Leave a comment