From 514151d70288b83bd26fce9d249596012bbc2c38 Mon Sep 17 00:00:00 2001 From: bhvishal Date: Wed, 21 Aug 2024 14:32:55 +0200 Subject: [PATCH] Add region_name to the client --- vectorizing/server/s3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vectorizing/server/s3.py b/vectorizing/server/s3.py index a002585..2e942e8 100644 --- a/vectorizing/server/s3.py +++ b/vectorizing/server/s3.py @@ -1,7 +1,7 @@ import cuid import boto3 -S3 = boto3.client("s3") +S3 = boto3.client("s3", region_name="eu-central-1") def upload_markup (markup, s3_bucket_name): cuid_str = cuid.cuid() @@ -21,7 +21,7 @@ def get_object_url(s3_file_key, s3_bucket_name): Key=s3_file_key, Bucket=s3_bucket_name ) - + except(Exception): return None @@ -40,4 +40,4 @@ def upload_file( s3_bucket_name, s3_file_key, ) - return get_object_url(s3_file_key, s3_bucket_name) \ No newline at end of file + return get_object_url(s3_file_key, s3_bucket_name)