From 84158454881a6853724233f408d60f2c8be6039f Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Thu, 20 Jul 2023 16:18:33 +1000 Subject: [PATCH] we can send now? --- app.py | 6 +++--- templates/answer-post.html | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index d49ebb4..5fe106d 100644 --- a/app.py +++ b/app.py @@ -180,13 +180,13 @@ def post_to_post(post_key): @app.route("/send_dudes", methods=["POST"]) def upload_file(): + + #### TODO вынести в обычный метод отправки if request.method == "POST": uploaded_file = request.files["file"] - minioClient = Minio( - "static.guaranteedstruggle.host", - ) if uploaded_file: + minioClient = Minio( "static.guaranteedstruggle.host" ) bucket_name = "thread-pics" size = os.fstat(uploaded_file.fileno()).st_size diff --git a/templates/answer-post.html b/templates/answer-post.html index 46b1ee4..41ee36d 100644 --- a/templates/answer-post.html +++ b/templates/answer-post.html @@ -3,10 +3,17 @@