function checkStorageConfig () {
// Check storage directory locations
if (isProdInstance()) {
- const configStorage = config.get('storage')
+ const configStorage = config.get<{ [ name: string ]: string }>('storage')
+
for (const key of Object.keys(configStorage)) {
if (configStorage[key].startsWith('storage/')) {
logger.warn(
'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.'
)
}
+
+ if (!CONFIG.OBJECT_STORAGE.UPLOAD_ACL.PUBLIC) {
+ throw new Error('object_storage.upload_acl.public must be set')
+ }
+
+ if (!CONFIG.OBJECT_STORAGE.UPLOAD_ACL.PRIVATE) {
+ throw new Error('object_storage.upload_acl.private must be set')
+ }
}
}