diff --git a/back/tgbot/tasks.py b/back/tgbot/tasks.py index 2d3d116..4e6e330 100644 --- a/back/tgbot/tasks.py +++ b/back/tgbot/tasks.py @@ -33,6 +33,7 @@ def upload_file(file_id): aws_secret_access_key=settings.SELECTEL['secret'], ) s3.upload_fileobj(r.raw, 'inventorization', file_id) - obj.image_aws_url = file_id + object_url = s3.generate_presigned_url('get_object', ExpiresIn=0, Params={'Bucket': 'inventorization', 'Key': file_id}) + obj.image_aws_url = object_url obj.save()