Change record status: 
Project: 
Introduced in branch: 
8.6.x
Introduced in version: 
8.6.0
Description: 

The file_copy process plugin was using the download process plugin and ignoring the reuse configuration key.

This is fixed adding a new configuration key 'file_exists' which is used to declare the file action to take and removing the configuration keys, 'reuse' and 'replace'. The available values for 'file_exists' are 'replace', 'rename' and 'use existing' and are defined as follows:

  • 'replace' - (default) Replace the existing file.
  • 'rename' - Ensure the destination filename is unique by appending '_{incrementing number}".
  • 'use existing' - The existing destination file is used.

The following examples use the download process plugin and the change also applies to the file_copy process plugin.

The rename option.
Before

 process:
 plugin: download
   source:
     - source_url
     - destination_uri
   rename: true

After

 process:
   plugin: download
   source:
     - source_url
     - destination_uri
   file_exists: rename

The 'reuse' option
Before

 process:
   plugin: download
   source:
     - source_url
     - destination_uri
   reuse: true

After

 process:
   plugin: download
   source:
     - source_url
     - destination_uri
   file_exists: use existing
Impacts: 
Module developers