Rules download

Categories

Component ID

2243965

Component name

Rules download

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

3155

Component created

Component changed

Component body

Exposes some Rules actions to download files from the internet using HTTP and use them within rules.

This module exposes the following actions:

  • Download a file from the internet.

There's a possibility that, if you fetch an URL from the site that triggered the rule, depending on your configuration, it triggers the same rule again. To prevent that, each file that is downloaded is appended with a special URL parameter (drupal_rules_download=1) that prevents the action to be run again.

Downloaded files are stored within the Drupal files system, so they can then be used to set file fields on entities and other drupal actions in which a file field item is expected. For adding it to a single File field use "Set a data value" and for a multiple File field use "Add an item to a list".

This module started of as an attempt to create PDF with the print module and use it in Rules, but because of how Print module works, it was safer to do it as a separate request and then, the module evolved into something more general and flexible.

Thanks to cgdrupalkwk that sponsored the initial development of this module.

2.x

This is a new branch with a subtle change, but as there's no upgrade path from 1.0 to 2.0 because it's a bit too much work as the change should be very easy to do manually.

Basically I am now using the default file entity so the previous actions present on 1.x should not be needed any more and you could use the default file tokens now.