gnu-social/plugins/StoreRemoteMedia/README

35 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-01-23 01:01:24 +09:00
The StoreRemoteMedia plugin downloads remotely attached files to local server.
Installation
============
add "addPlugin('StoreRemoteMedia');"
to the bottom of your config.php
Settings
========
2016-03-03 01:05:40 +09:00
domain_blacklist: Array of regular expressions. Always escape your dots and end your strings.
check_blacklist: Whether to check the domain_blacklist.
2016-01-23 01:01:24 +09:00
domain_whitelist: Array of regular expressions. Always escape your dots and end your strings.
check_whitelist: Whether to check the domain_whitelist.
max_image_bytes: Max image size. Anything bigger than this is rejected. 10MiB by default
2016-03-03 01:05:40 +09:00
When check_whitelist is set, only images from URLs matching a regex in the
domain_whitelist array are accepted for local storage. When check_blacklist
is set, images from URLs matching any regex in the domain_blacklist are
denied local storage. When both lists are checked, only images from URLs
that match a regex in the domain_whitelist and that match no regexen in the
domain_blacklist are accepted for local storage.
2016-01-23 01:01:24 +09:00
Example
=======
addPlugin('StoreRemoteMedia', array(
'domain_whitelist' => array(
'^i\d*\.ytimg\.com$' => 'YouTube',
'^i\d*\.vimeocdn\.com$' => 'Vimeo'
),
2016-03-03 01:05:40 +09:00
'check_whitelist' => true,
2016-01-23 01:01:24 +09:00
));