2018-08-28 22:15:47 +00:00
|
|
|
id: agaric_file
|
|
|
|
migration_group: agaric
|
|
|
|
label: Public files
|
|
|
|
source:
|
|
|
|
plugin: d7_file
|
|
|
|
scheme: public
|
|
|
|
process:
|
|
|
|
filename: filename
|
|
|
|
source_full_path:
|
2018-08-28 23:20:36 +00:00
|
|
|
-
|
|
|
|
plugin: concat
|
|
|
|
delimiter: /
|
|
|
|
source:
|
|
|
|
- filepath
|
|
|
|
-
|
|
|
|
plugin: str_replace
|
|
|
|
search: 'sites/default/files/'
|
|
|
|
# The old files must be located at this path:
|
|
|
|
replace: 'sites/default/import/'
|
|
|
|
-
|
|
|
|
plugin: urlencode
|
2018-08-28 22:15:47 +00:00
|
|
|
uri:
|
|
|
|
plugin: file_copy
|
|
|
|
source:
|
|
|
|
- '@source_full_path'
|
|
|
|
- uri
|
|
|
|
filemime: filemime
|
|
|
|
status: status
|
|
|
|
created: timestamp
|
|
|
|
changed: timestamp
|
|
|
|
uid:
|
2018-08-28 23:20:36 +00:00
|
|
|
-
|
|
|
|
plugin: migration_lookup
|
|
|
|
migration: agaric_user
|
|
|
|
source: uid
|
|
|
|
no_stub: true
|
|
|
|
-
|
|
|
|
# If the user id does not exists then migrate it as anonymous.
|
|
|
|
plugin: default_value
|
|
|
|
default_value: 0
|
2018-08-28 22:15:47 +00:00
|
|
|
destination:
|
|
|
|
plugin: entity:file
|
|
|
|
migration_dependencies:
|
|
|
|
required:
|
2018-08-28 23:20:36 +00:00
|
|
|
- agaric_user
|