From b858c9db9d4ece568d9c4dfd5fec86b9b0683347 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Wed, 15 Nov 2023 22:30:31 +1000 Subject: [PATCH] upd dev branche --- app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 9e512ad..562f127 100644 --- a/app.py +++ b/app.py @@ -90,7 +90,7 @@ def allowed_file(filename): def post_to_post(post_key): - + #### TODO resize pics https://stackoverflow.com/questions/53337318/how-can-i-resize-image-with-pil-on-upload-and-serve-them-with-flask-cloudy #### TODO allow only imgs, videos, and gifs if 'file' in request.files: @@ -100,10 +100,12 @@ def post_to_post(post_key): files = request.files.getlist("file") for file in files: size = os.fstat(file.fileno()).st_size + #### работает ли?? if allowed_file(file.filename): minioClient.put_object( bucket_name, file.filename, file, size ) + else: print(f'somebody tried to put this inside minio: {file.filename} size: {size}') @@ -152,6 +154,9 @@ def post_to_post(post_key): #### TODO websockets #### TODO kafka #### TODO shards +#### TODO grpc + + if __name__ == "__main__": app.run(debug=True, host='0.0.0.0') \ No newline at end of file