Skip to content

Commit

Permalink
✨ Add support for other S3-like providers (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
jljouannic committed Jun 6, 2022
1 parent a75e000 commit f6960dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions babybuddy/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@

AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") or None

AWS_S3_ENDPOINT_URL = os.environ.get("AWS_S3_ENDPOINT_URL") or None

if AWS_STORAGE_BUCKET_NAME:
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"

Expand Down
7 changes: 7 additions & 0 deletions docs/setup/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ If you would like to use AWS S3 for storage on ephemeral storage platforms like
Heroku you will need to create a bucket and add its name. See django-storages'
[Amazon S3 documentation](https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html).

## `AWS_S3_ENDPOINT_URL`

*Default:* `None`

Custom URL to use when connecting to S3, including scheme.
This allows to use a S3-compatible storage service of another provider than AWS.

## `CSRF_TRUSTED_ORIGINS`

*Default:* `None`
Expand Down

0 comments on commit f6960dc

Please sign in to comment.