fastapi-storages icon indicating copy to clipboard operation
fastapi-storages copied to clipboard

load `AWS_S3_BUCKET_NAME` and `AWS_S3_ENDPOINT_URL` from `env` as well?

Open stabldev opened this issue 1 month ago • 0 comments

currently, I need to specify both like this:

class CustomS3Storage(S3Storage):
    AWS_S3_BUCKET_NAME: str = os.environ.get("AWS_S3_BUCKET_NAME", "")
    AWS_S3_ENDPOINT_URL: str = os.environ.get("AWS_S3_ENDPOINT_URL", "")
    AWS_S3_USE_SSL: bool = not settings.DEBUG
    AWS_DEFAULT_ACL: str = "public-read"

reading AWS_S3_BUCKET_NAME and AWS_S3_ENDPOINT_URL from env feels redundant, since they're supposed to be read by default (like django-storages)... i believe there might be some reason for this...or am i missing something?

stabldev avatar Oct 27 '25 05:10 stabldev