2

I have the html form and i am submittng the form with jquery with following

var queryString = $('.form1').formSerialize(); 
 $.post('book/create/', queryString); 

But if i submit form without ajax then image gets uploaded by django function

Now the problem is , it is ignoring the file fields. what should i do

tej.tan
  • 4,067
  • 6
  • 28
  • 29

1 Answers1

3

You cannot upload files using XMLHttpRequest (AJAX).But you can try using some of the Ajax JQuery plugins to upload files

Also Check how-can-i-upload-files-asynchronously-with-jquery

Community
  • 1
  • 1
Balanivash
  • 6,709
  • 9
  • 32
  • 48