mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 08:09:37 +00:00
test
This commit is contained in:
parent
03fbea787e
commit
46baf08d2a
11
server.py
11
server.py
@ -642,12 +642,19 @@ def server():
|
||||
|
||||
con.close()
|
||||
|
||||
@app.route("/upload_file", methods=['POST'])
|
||||
@app.route("/upload_file", methods=["POST"])
|
||||
def upload_file():
|
||||
"""
|
||||
log_server("called /upload_file")
|
||||
file = request.files
|
||||
print(f"{file=}")
|
||||
return render_template(f'404.html')
|
||||
return render_template(f'404.html')"""
|
||||
file = request.files["file"]
|
||||
|
||||
if file:
|
||||
file.save("/Export", file.filename)
|
||||
return "File uploaded successfully!"
|
||||
return "No file found"
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
|
||||
@ -349,6 +349,10 @@
|
||||
<button onclick="save()">💾</button>
|
||||
</div>
|
||||
<div hidden class="tmplt_tab" id="_files">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<input type="submit" value="Upload">
|
||||
</form>
|
||||
<form class="modal-content animate" action="/upload_file" method="POST">
|
||||
<div class="container" style="margin-top: 2em">
|
||||
<label for="form_file">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user