bookwyrm/bookwyrm/storage_backends.py

18 lines
462 B
Python
Raw Normal View History

2021-06-19 10:01:41 +00:00
"""Handles backends for storages"""
from storages.backends.s3boto3 import S3Boto3Storage
2021-06-07 16:15:48 +00:00
2021-06-19 10:01:41 +00:00
class StaticStorage(S3Boto3Storage): # pylint: disable=abstract-method
"""Storage class for Static contents"""
2021-06-19 10:04:30 +00:00
2021-06-07 16:15:48 +00:00
location = "static"
default_acl = "public-read"
2021-06-19 10:01:41 +00:00
class ImagesStorage(S3Boto3Storage): # pylint: disable=abstract-method
"""Storage class for Image files"""
2021-06-19 10:04:30 +00:00
2021-06-07 16:15:48 +00:00
location = "images"
default_acl = "public-read"
file_overwrite = False