mojakob commited on
Commit
65abbab
·
verified ·
1 Parent(s): 4bfc93b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -20,10 +20,6 @@ import time
20
  import boto3
21
  from botocore.config import Config
22
 
23
- my_config = Config(
24
- signature_version='s3v4' # Force signature version 4
25
- )
26
-
27
  file_lock = threading.Lock()
28
  #logging.basicConfig(level=logging.DEBUG)
29
 
@@ -381,6 +377,14 @@ def save_to_excel(new_row, user_state):
381
 
382
  # 4. Upload to S3 (outside the lock), if credentials are present
383
  if s3_access_key and s3_secret_key and s3_endpoint and bucket_name:
 
 
 
 
 
 
 
 
384
  s3_client = boto3.client(
385
  "s3",
386
  aws_access_key_id=s3_access_key,
 
20
  import boto3
21
  from botocore.config import Config
22
 
 
 
 
 
23
  file_lock = threading.Lock()
24
  #logging.basicConfig(level=logging.DEBUG)
25
 
 
377
 
378
  # 4. Upload to S3 (outside the lock), if credentials are present
379
  if s3_access_key and s3_secret_key and s3_endpoint and bucket_name:
380
+ my_config = Config(
381
+ signature_version="s3v4",
382
+ s3={
383
+ "addressing_style": "path",
384
+ "payload_signing_enabled": False
385
+ }
386
+ )
387
+
388
  s3_client = boto3.client(
389
  "s3",
390
  aws_access_key_id=s3_access_key,