Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294413

Reuse option in FileCopy migrate process plugin not work with remote files

$
0
0

Problem/Motivation

I have tested that code:

process:
    uri:
      plugin: file_copy
      reuse: true
      source:
        - source_file_path_remote
        - destination_file_path

In the transform method of file_copy process plugin the download process plugin is called when a source file is remote. So the file is downloaded ignoring the reuse option.

Proposed resolution

Add a new configuration key 'file_exists' that holds a value declaring what action to take when the destination file exists. The options are
replace - Replace the existing destination file
rename - Make the destination filename unique by adding '_N'
use existing - Take no action

Remaining tasks

Review
Add change record


Viewing all articles
Browse latest Browse all 294413

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>