Commit 818c3fa7 authored by xjm's avatar xjm

Issue #2831630 by quietone, Jo Fitzgerald, Kifah Meeran, phenaproxima,...

Issue #2831630 by quietone, Jo Fitzgerald, Kifah Meeran, phenaproxima, gaurav.kapoor, mikeryan, heddn, xjm, claudiu.cristea: Add documentation to download process plugin
parent 90bdd031
...@@ -12,7 +12,42 @@ ...@@ -12,7 +12,42 @@
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Downloads a file from a remote location into the local file system. * Downloads a file from a HTTP(S) remote location into the local file system.
*
* The source value is an array of two values:
* - source URL, e.g. 'http://www.example.com/img/foo.img'
* - destination URI, e.g. 'public://images/foo.img'
*
* Available configuration keys:
* - rename: (optional) If set, a unique destination URI is generated. If not
* set, the destination URI will be overwritten if it exists.
* - guzzle_options: (optional)
* @link http://docs.guzzlephp.org/en/latest/request-options.html Array of request options for Guzzle. @endlink
*
* Examples:
*
* @code
* process:
* plugin: download
* source:
* - source_url
* - destination_uri
* @endcode
*
* This will download source_url to destination_uri.
*
* @code
* process:
* plugin: download
* source:
* - source_url
* - destination_uri
* rename: true
* @endcode
*
* This will download source_url to destination_uri and ensure that the
* destination URI is unique. If a file with the same name exists at the
* destination, a numbered suffix like '_0' will be appended to make it unique.
* *
* @MigrateProcessPlugin( * @MigrateProcessPlugin(
* id = "download" * id = "download"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment