title: Django REST serializer not working with files
body: <p>For example I have the following in <code>models.py</code>:</p>
  
  <pre><code>def upload_attachments(filename):
      return '/logos/%Y/%m_%d/{}'.format(filename) # well, not exactly, but close
  
  class Client(models.Model):
      name = models.CharField(unique=True, max_length=255)
      logo = models.ImageField(upload_to=upload_attachments)
  </code></pre>
  
  <p>Serializer for this model would look this way:</p>
  
  <pre><code>class ClientSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = Client
          fields = (
              'name',
              'logo'
          )
  </code></pre>
  
  <p>The view, that is working with this model:</p>
  
  <pre><code>@renderer_classes((JSONRenderer,))
  @parser_classes((FormParser, MultiPartParser))
  class ClientView(APIView):
  
  def post(self, request, domain=None):
  
     data = request.DATA.get('data', None)
     serializer = ClientSerializer(data=data, files=request.FILES.get('file', None))
  
     if serializer.is_valid():
        serializer.save()
        return Response(utils.OK, status=status.HTTP_201_CREATED)
     return Response({'error': serializer.errors}, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>I send form POST with key <code>file</code> containing the <code>logo.png</code> file and key <code>data</code> containing the JSON. I get either no arguement <code>files</code> although there are many examples on the net of that working and if I leave out the file (although I should get it) - I get the error with the <code>data</code> being unicode, not dict and if I wrap the <code>data</code> into the <code>json.loads()</code> - there are <em>"too many values to unpack"</em>.</p>
  
  <p><strong>Update:</strong> I found what was a problem with data. It was easy actually:</p>
  
  <pre><code>   data = request.DATA.get('data', None)
     data = data.get('data', None) # roughly, sure it could be prettyfied
     serializer = ClientSerializer(data=data, files=request.FILES.get('file', None))
  </code></pre>
  
  <p>The problem with the file still stands.</p>