class FileUploadView(views.APIView):
    parser_classes = FileUploadParser,

def put(self, request, filename, format=None):
    file_obj = request.FILES['file']
return Response(status=204)
Django Rest Framework File Upload