Spaces:
Build error
Build error
Commit
·
a25c7ca
1
Parent(s):
155475c
test: add debug
Browse files- apis/s3.py +2 -0
apis/s3.py
CHANGED
|
@@ -2,6 +2,7 @@ import os
|
|
| 2 |
import boto3
|
| 3 |
import botocore
|
| 4 |
import logging
|
|
|
|
| 5 |
from dotenv import load_dotenv
|
| 6 |
|
| 7 |
from models.response import Response
|
|
@@ -34,6 +35,7 @@ class S3:
|
|
| 34 |
|
| 35 |
# Function to upload file to S3
|
| 36 |
def upload_file(self, bucket_name, file, name, metadata:dict):
|
|
|
|
| 37 |
res = Response()
|
| 38 |
try:
|
| 39 |
# self.client.upload_fileobj(
|
|
|
|
| 2 |
import boto3
|
| 3 |
import botocore
|
| 4 |
import logging
|
| 5 |
+
import json
|
| 6 |
from dotenv import load_dotenv
|
| 7 |
|
| 8 |
from models.response import Response
|
|
|
|
| 35 |
|
| 36 |
# Function to upload file to S3
|
| 37 |
def upload_file(self, bucket_name, file, name, metadata:dict):
|
| 38 |
+
logging.info(f'Current metadata: {json.dumps(metadata)}')
|
| 39 |
res = Response()
|
| 40 |
try:
|
| 41 |
# self.client.upload_fileobj(
|