gnu-social/plugins/StoreRemoteMedia
Diogo Peralta Cordeiro 22b5dd8567 [Media] Fix several issues
[StoreRemoteMedia] Upgrade plugin to use the new Media system

API Changes:
- Added getters to File to better formalize the ideas of the commit "[Media] Fix issues with database file storage"

UI Changes:
- Now presented thumbnails are actual thumbnails (bug fix)
- Attachment actions have a slightly more extended behaviour

Many other minor bug fixes...
2021-02-21 16:03:46 +00:00
..
locale [VersionBump] 2.0.0alpha0 2020-08-04 05:31:44 +01:00
scripts [DATABASE] Fix use of ORDER BY with DISTINCT 2020-08-27 11:15:39 +03:00
README.md [Media] Fix several issues 2021-02-21 16:03:46 +00:00
StoreRemoteMediaPlugin.php [Media] Fix several issues 2021-02-21 16:03:46 +00:00

README.md

The StoreRemoteMedia plugin downloads remotely attached files to local server.

IMPORTANT: If using both Embed and StoreRemoteMedia plugins, Embed should be added first.

Installation

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

Settings

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

max_size: Max media size. Anything bigger than this is rejected. 10MiB by default.

When check_whitelist is set, only images from URLs matching a regex in the domain_whitelist array are accepted for local storage.

Example

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