bookwyrm/bookwyrm/storage_backends.py
Joachim cba34780d8 Use S3 as static and media storage
TODO

- [ ] Write some documentation for non-AWS, S3-compatible services
- [ ] Make a management command to move existing media to the new S3 bucket
- [ ] See if Nginx can reverse-proxy the S3 bucket in order to keep the files accessible through the domain name
2021-06-07 18:12:48 +02:00

11 lines
268 B
Python

from storages.backends.s3boto3 import S3Boto3Storage
class StaticStorage(S3Boto3Storage):
location = 'static'
default_acl = 'public-read'
class ImagesStorage(S3Boto3Storage):
location = 'images'
default_acl = 'public-read'
file_overwrite = False