How to upload multiple files in django rest framework : <p>In django rest framework, I am able to upload single file using <a href="https://github.com/danialfarid/ng-file-upload" rel="noreferrer">danialfarid/ng-file-upload</a> </p>

<p>views.py:</p>

<pre><code>class PhotoViewSet(viewsets.ModelViewSet):
    serializer_class = PhotoSerializer
    parser_classes = (MultiPartParser, FormParser,)
    queryset=Photo.objects.all()

    def perform_create(self, serializer):
        serializer.save(blogs=Blogs.objects.latest('created_at'),
                   image=self.request.data.get('image'))
</code></pre>

<p>serializers.py:</p>

<pre><code>class PhotoSerializer(serializers.ModelSerializer):
    class Meta:
        model = Photo
</code></pre>

<p>models.py:</p>

<pre><code>class Photo(models.Model):
    blogs = models.ForeignKey(Blogs, related_name='blogs_img')
    image = models.ImageField(upload_to=content_file_name)
</code></pre>

<p>When I try to upload multiple file. I get in </p>

<p>chrome developer tools:
Request Payload</p>

<pre><code>------WebKitFormBoundaryjOsYUxPLKB1N69Zn
Content-Disposition: form-data; name="image[0]"; filename="datacable.jpg"
Content-Type: image/jpeg


------WebKitFormBoundaryjOsYUxPLKB1N69Zn
Content-Disposition: form-data; name="image[1]"; filename="datacable2.jpg"
Content-Type: image/jpeg
</code></pre>

<p>Response:</p>

<pre><code>{"image":["No file was submitted."]}
</code></pre>

<p>I don't know how to write serializer for uploading multiple file. Any body please help.</p>

<p>Thanks in Advance</p>
