/
Module: Settings
Configure the Settings Module
E.g. given these settings:
// meteor-settings.json
{
"unchained": {
"files": {
"media": {
"maxSize": 10485760
}
}
}
}
you can access maxSize
with this:
import { getSetting } from 'meteor/unchained:core-settings';
const maxSize = getSetting('files.media.maxSize')
// it uses lodash.get, so you can pass a path as an array
const maxSize = getSetting(["files", "media", "maxSize"])
// and you can specify a default value
const maxSize = getSetting("files.avatars.maxSize", 10485760);