title: How do you post a file along with some other data using axios react?
body: <p>So my model looks like this.</p>
  
  <pre><code># posts/models.py 
  from django.db import models 
  
  class Post(models.Model):
  
      title = models.TextField() 
  
      cover = models.ImageField(upload_to='images/') 
  
      def __str__(self): 
  
          return self.title
  </code></pre>
  
  <p>And I know you can upload file using axios like this</p>
  
  <pre><code> fileUpload(file){ 
  const url ='http://example.com/file-upload'; 
  
  const formData = new FormData(); 
  
  formData.append('file',file) 
  
  const config = { headers: { 'content-type': 'multipart/form-data' } } 
  
  return post(url, formData,config)
  
   } 
  </code></pre>
  
  <p>But I want to upload the image along with the title. How do I do that in axios?</p>