This domain function allows you to create rules that will go through your whole media gallery and removes your media gallery files periodically.

This feature can be found in domain administration under Advanced settings.

Set your desired rules

  • Cleanup interval - set in hours. Every x-th whole hour this clean up will be run.
  • Max file age - How old file must be to be inherited to set of files to be deleted.
  • Filename pattern - regular expression can be used to determine if file should be inherited in set of file to be deleted
  • Formula - Formula with file object can be used to determine if file should be inherited to be deleted. If formula return true, file will be deleted



All inputs have AND operator between them. So all set values must be true, to flag file to be deleted

Object file has following fields: id, title, filename, createdWhen

Here is an example of formula, that can be used

if (file.filename == 'abc') { 
  return true 
}
return false
  • No labels