Implements Better Abstraction on Top of StorageService and File Handlers

Adds Expiration Time to Config

Reformats Project
This commit is contained in:
2023-08-10 01:54:17 -03:00
parent 0b320a3222
commit 2bd7ae10b9
12 changed files with 125 additions and 66 deletions

View File

@@ -1,3 +1,5 @@
from resize_image_service.utils.enums.storage_type import StorageType
from dotenv import load_dotenv
import os
@@ -5,9 +7,11 @@ import os
def get_config_s3():
load_dotenv()
return {
"aws_access_key_id": os.environ.get("AWS_ACCESS_KEY_ID", None),
"aws_secret_access_key": os.environ.get("AWS_SECRET_ACCESS_KEY", None),
"region_name": os.environ.get("AWS_REGION_NAME", None),
"bucket_name": os.environ.get("AWS_BUCKET_NAME", None),
"expires_in": os.environ.get("EXPIRES_IN", 3600),
}