title: Django Rest Framework File Upload
body: <p>I am using Django Rest Framework and AngularJs to upload a file. My view file looks like this:</p>
  
  <pre><code>class ProductList(APIView):
      authentication_classes = (authentication.TokenAuthentication,)
      def get(self,request):
          if request.user.is_authenticated(): 
              userCompanyId = request.user.get_profile().companyId
              products = Product.objects.filter(company = userCompanyId)
              serializer = ProductSerializer(products,many=True)
              return Response(serializer.data)
  
      def post(self,request):
          serializer = ProductSerializer(data=request.DATA, files=request.FILES)
          if serializer.is_valid():
              serializer.save()
              return Response(data=request.DATA)
  </code></pre>
  
  <p>As the last line of post method should return all the data, I have several questions:</p>
  
  <ul>
  <li>how to check if there is anything in <code>request.FILES</code>?</li>
  <li>how to serialize file field?</li>
  <li>how should I use parser?</li>
  </ul>