I get a file by html using type="file".
<form action="/docs/enviado/" method="post">{% csrf_token %}
<input type="file" accept="pdf" name = "projeto"/><br /><br />
<input type="submit" value="enviar" />
</form>
But I can not save using python, I tried that but it did not work:
projeto = request.POST.get('projeto')
projeto.save
And so:
projeto = request.FILES["projeto"]
projeto.save
I just need to get the pdf file and save it to the directory that already exists.