2021-02-17 03:30:21 +09:00
|
|
|
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
|
|
|
|
========
|
2021-02-19 21:10:37 +09:00
|
|
|
* `domain_whitelist`: Array of regular expressions. Always escape your dots and end your strings.
|
|
|
|
* `check_whitelist`: Whether to check the domain_whitelist.
|
2021-02-17 03:30:21 +09:00
|
|
|
|
|
|
|
When check_whitelist is set, only images from URLs matching a regex in the
|
2021-02-19 21:10:37 +09:00
|
|
|
domain_whitelist array are accepted for local storage.
|
|
|
|
|
|
|
|
* `thumbnail_width`: Maximum width of the thumbnail in pixels. Defaults to global `[thumbnail][width]`.
|
|
|
|
* `thumbnail_height`: Maximum height of the thumbnail in pixels. Defaults to global `[thumbnail][height]`.
|
|
|
|
* `crop`: Crop to the thumbnail size and don't preserve the original file. Defaults to false.
|
|
|
|
* `max_size`: Max media size. Anything bigger than this is rejected. Defaults to global `[attachments][file_quota]`.
|
2021-02-17 03:30:21 +09:00
|
|
|
|
|
|
|
Example
|
|
|
|
=======
|
|
|
|
|
|
|
|
```
|
|
|
|
addPlugin('StoreRemoteMedia', [
|
|
|
|
'domain_whitelist' => [
|
|
|
|
'^i\d*\.ytimg\.com$' => 'YouTube',
|
|
|
|
'^i\d*\.vimeocdn\.com$' => 'Vimeo'
|
|
|
|
],
|
|
|
|
'check_whitelist' => true,
|
|
|
|
]);
|
|
|
|
```
|