Add a Save Source To Files feature for Migrate Source UI.

Created on 9 May 2022, about 3 years ago
Updated 8 July 2025, 4 days ago

Problem/Motivation

Sometimes, when a User / Admin uploads a file via Migrate Source UI, you'd want to save the file at the location provided in the Migration Source Path.

For example, if the migration file's source contains :

source :
  plugin: csv
  path: sites/default/files/my-file.csv

The file uploaded will overwrite my-file.csv.

Proposed resolution

Add a checkbox in Migrate Source UI to upload the file or not.
Add in the form validation a file-move to the new path.

Here's an example image :

Remaining tasks

  1. Review the code. There's bound to be some roadblock I didn't think about when writting the code.
  2. Standardize the code : The code I've written is not compliant with Drupal Standards. I've also refactored the Form class a bit.
  3. Write some tests ?
Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇪Belgium kenowax Mons

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024