Answer the question
In order to leave comments, you need to log in
How to upload a file to the server (on python 3.8.5) via html form?
Hello! Created the logic for parsing the pdf file. Now I want to implement uploading a file via form to the server for parsing and writing to the Postgres database. The only problem is that I don’t understand how to upload the file and I can’t find it in the open
doc = fitz.open(pdf_document) # Открытие док-та
<form action="registration.py" method="POST">
<div class="form-group">
<label for="doc">Загрузите файл</label>
<input type="file" class="form-control-file" id="doc">
</div>
<button type="submit" class="btn btn-outline-primary">Go!</button>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question