1
I get an html file 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’t save using python, I tried so but it didn’t work:
projeto = request.POST.get('projeto')
projeto.save
And so:
projeto = request.FILES["projeto"]
projeto.save
I just need to receive the pdf file and save in the directory that is already.
So no way to do it without using models?
– Gabriel Augusto Ribeiro Ferrei
You can do without using the model yes. You just have to see what you will do with the file and how you will save in the directory.
– Puam Dias