form = UploadFileForm(request.POST, request.FILES)
if not form.is_valid():
    return HttpResponseServerError('Invalid call')
handle_uploaded_file(request.FILES['file'])
return HttpResponse('OK')
Writing a file upload API using Django