By quietone on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.6.x
Introduced in version:
8.6.0
Issue links:
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: trueAfter
process:
plugin: download
source:
- source_url
- destination_uri
file_exists: rename
The 'reuse' option
Before
process:
plugin: download
source:
- source_url
- destination_uri
reuse: trueAfter
process:
plugin: download
source:
- source_url
- destination_uri
file_exists: use existingImpacts:
Module developers