gnu-social/plugins/StoreRemoteMedia
Diogo Cordeiro 98ebe1f63b [StoreRemoteMedia] script removeRemoteMedia.php was deleting every file posted without being via web interface
Added two more options: delete image-only attachments; delete previews (like oembed thumbs)
Some further minor improvements.
Thanks to colegota for spotting this issue.
2019-04-17 02:05:04 +01:00
..
scripts [StoreRemoteMedia] script removeRemoteMedia.php was deleting every file posted without being via web interface 2019-04-17 02:05:04 +01:00
README update readme 2016-03-02 16:05:40 +00:00
StoreRemoteMediaPlugin.php file_quota for OembedPlugin too 2016-07-21 03:19:05 +02:00

The StoreRemoteMedia plugin downloads remotely attached files to local server.

Installation
============
add "addPlugin('StoreRemoteMedia');"
to the bottom of your config.php

Settings
========
domain_blacklist: Array of regular expressions. Always escape your dots and end your strings.
check_blacklist: Whether to check the domain_blacklist.

domain_whitelist: Array of regular expressions. Always escape your dots and end your strings.
check_whitelist: Whether to check the domain_whitelist.

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.

Example
=======
addPlugin('StoreRemoteMedia', array(
    'domain_whitelist' => array(
        '^i\d*\.ytimg\.com$' => 'YouTube',
        '^i\d*\.vimeocdn\.com$' => 'Vimeo'
    ),
    'check_whitelist' => true,
));