Files
edx-platform/cms/djangoapps/export_course_metadata/storage.py
Matthew Piatetsky 8d1d7b2222 feat: Export highlights to s3 for use by braze
Things other than highlights may be exported in the future. The storage class is flexible so backends other than s3 may be used in the future.
AA-461
2021-03-04 15:57:30 -05:00

21 lines
600 B
Python

"""
Storage backend for course metadata export.
"""
from django.conf import settings
from django.core.files.storage import get_storage_class
from storages.backends.s3boto import S3BotoStorage
class CourseMetadataExportS3Storage(S3BotoStorage): # pylint: disable=abstract-method
"""
S3 backend for course metadata export
"""
def __init__(self):
bucket = settings.COURSE_METADATA_EXPORT_BUCKET
super().__init__(bucket=bucket, custom_domain=None, querystring_auth=True)
course_metadata_export_storage = get_storage_class(settings.COURSE_METADATA_EXPORT_STORAGE)()