XMPP/Metronome: Setting file expiration / File storage

Partial update: For anyone else wondering, I’ve worked out that values such as 6*1024*1024 symbolise the number of files (n) and the size of the files in (1024 bytes = 1)KiB, MiB, etc. For example, 2 GiB is represented as:

2 * 1024 * 1024 * 1024   = 2 GiB, e.g.:
n *  GiB *  MiB *  KiB 

This post says that any changes to the config file (I guess the global one?) must also be reflected in the modules files, located in /usr/lib/metronome/modules/.

E.g., in the module file mod_http_upload.lua, there’s a section called “config”:

-- config
local file_size_limit = module:get_option_number("http_file_size_limit", 3*1024*1024); -- 3 MiB
local quota = module:get_option_number("http_file_quota", 40*1024*1024);
local max_age = module:get_option_number("http_file_expire_after", 172800);
local expire_any = module:get_option_number("http_file_perfom_expire_any", 1800);
local expire_slot = module:get_option_number("http_file_expire_upload_slots", 900);
local expire_cache = module:get_option_number("http_file_expire_file_caches", 450);
local throttle_time = module:get_option_number("http_file_throttle_time", 180);
local default_base_path = module:get_option_string("http_file_base_path", "share");
local storage_path = module:get_option_string("http_file_path", join_path(metronome.paths.data, "http_file_upload"));
lfs.mkdir(storage_path);

What’s now unclear to me is how this relates to the global and domain config files. The global config file does not contain values for these modules (by default), but the domain-specific ones in the /etc/metronome/conf.d/ folder do – that’s where I got the values in my first post from; I’d moved them to my global config file – and they don’t match with the values in the “--config” section above.
The above values do however match with what metronome.im’s configuration page says are the default values.

So… do we ignore the global config file and only edit the domain-specific one, as this user thinks (and then edit the module file so it matches)?

This is my learning curve. The quest continues.

1 Like