title: File Upload handling in Django rest framework
body: <p>I am trying to add a filefield in my django models but I am not sure how to handle the files coming from React Front-end.</p>
  <p>Models.py</p>
  <pre><code>class Product(models.Model):
      
      name = models.CharField(max_length=500, default=0)
      short_code = models.CharField(max_length=500, default=0,unique=True)
      document = models.FileField(upload_to='products/', null=True, blank=True)
      owner = models.ForeignKey(User, on_delete=models.CASCADE)
  </code></pre>
  <p>Serializer.py</p>
  <pre><code>class ProductSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = Product
          fields = &quot;__all__&quot;
  </code></pre>
  <p>When the File is uploaded from Frontend it gives the following error in Network</p>
  <blockquote>
  <p>{&quot;detail&quot;:&quot;Unsupported media type &quot;multipart/form-data
  boundary=967753268136369&quot; in request.&quot;}</p>
  </blockquote>
  <p>I have gone through the documentation of DRF and I am sure I need to implement MultiParser in it but I am not sure how.
  Also Is there a better way to handle &quot;File Handling&quot;? I am using Ant Design File Upload in the application</p>