def file_upload_view(request):
form_data = request.POST.copy()<EOL>form_data.update(request.FILES)<EOL>if isinstance(form_data.get('<STR_LIT>'), UploadedFile) and isinstance(form_data['<STR_LIT:name>'], str):<EOL><INDENT>if os.path.dirname(form_data['<STR_LIT>'].name) != '<STR_LIT>':<EOL><INDENT>return HttpResponseServerError()<EOL><DEDENT>return HttpResponse('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>return HttpResponseServerError()<EOL><DEDENT>
A file upload can be updated into the POST dictionary.