Use ORA2 django storage on openstack and devstack.
Default ORA2 storage settings use AWS, so no change required to aws envs.
This commit is contained in:
committed by
Eric Fischer
parent
cdd0e945bd
commit
0fcdcb02bb
@@ -17,6 +17,7 @@ SWIFT_NAME_PREFIX = FILE_UPLOAD_STORAGE_PREFIX
|
||||
SWIFT_USE_TEMP_URLS = AUTH_TOKENS.get('SWIFT_USE_TEMP_URLS', False)
|
||||
SWIFT_TEMP_URL_KEY = AUTH_TOKENS.get('SWIFT_TEMP_URL_KEY')
|
||||
SWIFT_TEMP_URL_DURATION = AUTH_TOKENS.get('SWIFT_TEMP_URL_DURATION', 1800) # seconds
|
||||
SWIFT_CONTENT_TYPE_FROM_FD = AUTH_TOKENS.get('SWIFT_CONTENT_TYPE_FROM_FD', True)
|
||||
|
||||
if AUTH_TOKENS.get('SWIFT_REGION_NAME'):
|
||||
SWIFT_EXTRA_OPTIONS = {'region_name': AUTH_TOKENS['SWIFT_REGION_NAME']}
|
||||
@@ -27,3 +28,5 @@ elif SWIFT_AUTH_URL and SWIFT_USERNAME and SWIFT_KEY:
|
||||
DEFAULT_FILE_STORAGE = 'swift.storage.SwiftStorage'
|
||||
else:
|
||||
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
|
||||
|
||||
ORA2_FILEUPLOAD_BACKEND = "django"
|
||||
|
||||
Reference in New Issue
Block a user