mirror of https://github.com/snachodog/mybuddy.git
✨ Add support for other S3-like providers (#476)
This commit is contained in:
parent
a75e000af6
commit
f6960dc2e9
|
@ -227,6 +227,8 @@ AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") or None
|
||||||
|
|
||||||
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") or None
|
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:
|
if AWS_STORAGE_BUCKET_NAME:
|
||||||
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
|
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
|
||||||
|
|
||||||
|
|
|
@ -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'
|
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).
|
[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`
|
## `CSRF_TRUSTED_ORIGINS`
|
||||||
|
|
||||||
*Default:* `None`
|
*Default:* `None`
|
||||||
|
|
Loading…
Reference in New Issue