From 75958f9d9a9c95f0ed97bd7b4f9dcf3448d7de56 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Thu, 20 Jul 2023 16:20:11 +1000 Subject: [PATCH] we can send now? --- app.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 5fe106d..da53948 100644 --- a/app.py +++ b/app.py @@ -133,7 +133,19 @@ def post_a_post(post_key): @app.route('/post_to_another_post/', methods=['POST']) def post_to_post(post_key): - + + uploaded_file = request.files["file"] + + if uploaded_file: + minioClient = Minio( "static.guaranteedstruggle.host" ) + bucket_name = "thread-pics" + size = os.fstat(uploaded_file.fileno()).st_size + + minioClient.put_object( + bucket_name, uploaded_file.filename, uploaded_file, size + ) + + postos = db.collection('posts') data = request.form['send_this_text']