title: How to upload multiple Images using DJango Rest Framework?
body: <p>I am able to upload a single image with the following code. If I select multiple images then only the last image among the selected image is getting uploaded.<br> <br>
  models.py<br></p>
  
  <pre><code>class Image(models.Model):
  property_id = models.ForeignKey(
                  'properties.Address',
                  null=False,
                  default=1,
                  on_delete=models.CASCADE
              )
  image = models.ImageField(upload_to=directory_path)
  </code></pre>
  
  <p>serializers.py <br></p>
  
  <pre><code>class ImageSerializer(serializers.ModelSerializer):
  class Meta:
      model = Image
      fields = (
          'property_id',
          'image'
      )
  </code></pre>
  
  <p>views.py <br></p>
  
  <pre><code>class ImageView(APIView):
  parser_classes = (MultiPartParser, FormParser)
  
  def get(self, request):
      all_images = Image.objects.all()
      serializer = ImageSerializer(all_images, many=True)
      return JsonResponse(serializer.data, safe=False)
  
  def post(self, request, *args, **kwargs):
      file_serializer = ImageSerializer(data=request.data)
      if file_serializer.is_valid():
          file_serializer.save()
          return Response(file_serializer.data, status=status.HTTP_201_CREATED)
      else:
          return Response(file_serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p><br> I am a little new to Django. I want to loop over my array of images which is received in the request.data Can anyone tell me how to do it?</p>