title: Upload name and image from postman in Django
body: <p>I'm trying to upload image and name from postman in Django. I'm able to store name but when I try to store Image it gives me this error -
  <a href="https://i.stack.imgur.com/XTSjp.png" rel="nofollow noreferrer">Error</a></p>
  <p>This how I'm uploading data-<a href="https://i.stack.imgur.com/mr7R9.png" rel="nofollow noreferrer">Posting data from postman</a></p>
  <p>Here is my code-</p>
  <p><strong>Views.py</strong></p>
  <pre><code>@csrf_exempt
  def uploadApi(request, id=0):
  
   if request.method == 'GET':
      image = Images_model.objects.all()
      image_serializer = ImageSerializer(image, many=True)
      return JsonResponse(image_serializer.data, safe=False)
  
   elif request.method == 'POST':
      image = JSONParser().parse(request, request.FILES)
      image_serializer = ImageSerializer(data=image)
  
      if image_serializer.is_valid():
          image_serializer.save()
          return JsonResponse(&quot;Added Successfully&quot;, safe=False)
  
      return JsonResponse(&quot;Failed to Add&quot;, safe=False)
  
   elif request.method == &quot;PUT&quot;:
      image = JSONParser().parse(request)
      image_get = Images_model.objects.get(id=image['id'])
      image_serializer = ImageSerializer(image_get, data=image)
  
      if image_serializer.is_valid():
          image_serializer.save()
          return JsonResponse(&quot;Updated Successfully&quot;, safe=False)
  
      return JsonResponse(&quot;Failed to Update&quot;, safe=False)
  
   elif request.method == &quot;DELETE&quot;:
      image = Images_model.objects.get(ID=id)
      image.delete()
      return JsonResponse(&quot;Deleted Successfully&quot;, safe=False)
  </code></pre>