README 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. The StoreRemoteMedia plugin downloads remotely attached files to local server.
  2. Installation
  3. ============
  4. add "addPlugin('StoreRemoteMedia');"
  5. to the bottom of your config.php
  6. Settings
  7. ========
  8. domain_blacklist: Array of regular expressions. Always escape your dots and end your strings.
  9. check_blacklist: Whether to check the domain_blacklist.
  10. domain_whitelist: Array of regular expressions. Always escape your dots and end your strings.
  11. check_whitelist: Whether to check the domain_whitelist.
  12. max_image_bytes: Max image size. Anything bigger than this is rejected. 10MiB by default
  13. When check_whitelist is set, only images from URLs matching a regex in the
  14. domain_whitelist array are accepted for local storage. When check_blacklist
  15. is set, images from URLs matching any regex in the domain_blacklist are
  16. denied local storage. When both lists are checked, only images from URLs
  17. that match a regex in the domain_whitelist and that match no regexen in the
  18. domain_blacklist are accepted for local storage.
  19. Example
  20. =======
  21. addPlugin('StoreRemoteMedia', array(
  22. 'domain_whitelist' => array(
  23. '^i\d*\.ytimg\.com$' => 'YouTube',
  24. '^i\d*\.vimeocdn\.com$' => 'Vimeo'
  25. ),
  26. 'check_whitelist' => true,
  27. ));