From 82f61833e7eb74d6e3eb4518b3b9479024829d02 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Mon, 15 Mar 2021 22:14:34 +0300 Subject: [PATCH] fix robot --- bots/modules/robot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bots/modules/robot.py b/bots/modules/robot.py index 28edbbf..16c360a 100644 --- a/bots/modules/robot.py +++ b/bots/modules/robot.py @@ -43,12 +43,11 @@ class RobotBotModuleConfig(TelegramBotModuleConfig): file = ctx.bot.get_file(file_id) filename = os.path.basename(file.file_path) - logging.warning(str(file.__dict__)) with TemporaryDirectory() as d: file_path = os.path.join(d, filename) file.download(file_path) s3 = boto3.client('s3', aws_access_key_id=config.aws_access_key_id, aws_secret_access_key=config.aws_secret_access_key) - s3.upload_file(file_path, config.s3_bucket, filename) + s3.upload_file(file_path, config.s3_bucket, filename, extra_args={'ACL': 'public-read'}) file_url = f'https://{config.s3_bucket}.s3.amazonaws.com/{filename}' if update.message.photo: markup.inline_keyboard = [[