drupalorg_migrate-1.0.x-dev/migrations/drupalorg_migrate_changenotice_upload_files.yml
migrations/drupalorg_migrate_changenotice_upload_files.yml
langcode: en
status: true
id: drupalorg_migrate_changenotice_upload_files
#migration_tags:
# - 'Drupal 7'
# - Content
migration_group: drupalorg_migrate
label: 'Migrate Change Notice Upload field Files'
source:
plugin: d7_file_changenotice_files
scheme: public
constants:
# Path changed via hook_migration_plugins_alter
# and set via $config['drupalorg_migrate']['project_files']['source']
source_base_path: '/var/www/html/web/files/d7-files'
remote_base_path: 'https://www.drupal.org'
destination:
plugin: entity:file
process:
# If you are using this file to build a custom migration consider removing
# the fid field to allow incremental migrations.
# fid: fid
filename: filename
local_temp_path:
plugin: concat
delimiter: /
source:
- constants/source_base_path
- filepath
local_full_path:
-
plugin: callback
callable: file_exists
source: '@local_temp_path'
-
plugin: skip_on_empty
method: process
-
plugin: get
source: '@local_temp_path'
remote_full_path:
-
plugin: concat
delimiter: /
source:
- constants/remote_base_path
- filepath
-
plugin: urlencode
source_full_path:
-
plugin: null_coalesce
source:
- '@local_full_path'
- '@remote_full_path'
uri:
plugin: file_copy
source:
- '@source_full_path'
- uri
filemime: filemime
status: status
created: timestamp
changed: timestamp
uid:
plugin: migration_lookup
migration: drupalorg_migrate_users
source: uid
migration_dependencies:
optional:
- drupalorg_migrate_users
dependencies:
enforced:
module:
- drupalorg_migrate
