update
This commit is contained in:
parent
40f6bb7953
commit
00ab98c9cc
|
|
@ -15,14 +15,17 @@
|
|||
<main class="container">
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<input type="file" id="file-input" name="file" accept=".xls, .csv, .xlsx" required>
|
||||
<p class="grid">
|
||||
<label for="range">Velikost textu
|
||||
</label>
|
||||
<input type="range" min="0.5" max="10" value="1" step="0.5" id="range" name="range">
|
||||
|
||||
<label id="font_size">1</label>
|
||||
</p>
|
||||
<!-- make submit possible only if file is choosen -->
|
||||
<div class="grid">
|
||||
<label for="range">Velikost textu
|
||||
</label>
|
||||
<input type="range" min="0.5" max="10" value="1" step="0.5" id="range" name="range">
|
||||
<label id="font_size">1</label>
|
||||
</div>
|
||||
|
||||
<label for="file-name">Název výstupního DXF</label>
|
||||
<input type="text" id="file-name" name="output_file" placeholder="název výstupního DXF:" value="vystupni_body">
|
||||
|
||||
<input type="submit" id="submit-button" value="Nahrát a stáhnout hotový">
|
||||
|
||||
</form>
|
||||
|
|
|
|||
3
test.py
3
test.py
|
|
@ -15,6 +15,7 @@ def upload_file():
|
|||
# Create a text file with the uploaded file name
|
||||
|
||||
velikost = request.form['range']
|
||||
nazev_souboru = request.form['output_file']
|
||||
print(velikost)
|
||||
|
||||
body = nacti_data_z_excelu(file)
|
||||
|
|
@ -25,7 +26,7 @@ def upload_file():
|
|||
return send_file(
|
||||
path_or_file=dxf_file,
|
||||
as_attachment=True,
|
||||
download_name='hotovson.dxf',
|
||||
download_name= nazev_souboru+".dxf" or 'hotovson.dxf',
|
||||
mimetype='application/octet-stream'
|
||||
)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue