Pull merge.
[yaffs-website] / web / core / modules / file / migrations / d7_file.yml
1 # Every migration that references a file by Drupal 7 fid should specify this
2 # migration as an optional dependency.
3 id: d7_file
4 label: Public files
5 audit: true
6 migration_tags:
7   - Drupal 7
8   - Content
9 source:
10   plugin: d7_file
11   scheme: public
12   constants:
13     # The tool configuring this migration must set source_base_path. It
14     # represents the fully qualified path relative to which URIs in the files
15     # table are specified, and must end with a /. See source_full_path
16     # configuration in this migration's process pipeline as an example.
17     source_base_path: ''
18 process:
19   # If you are using this file to build a custom migration consider removing
20   # the fid field to allow incremental migrations.
21   fid: fid
22   filename: filename
23   source_full_path:
24     -
25       plugin: concat
26       delimiter: /
27       source:
28         - constants/source_base_path
29         - filepath
30     -
31       plugin: urlencode
32   uri:
33     plugin: file_copy
34     source:
35       - '@source_full_path'
36       - uri
37   filemime: filemime
38   # No need to migrate filesize, it is computed when file entities are saved.
39   # filesize: filesize
40   status: status
41   # Drupal 7 didn't keep track of the file's creation or update time -- all it
42   # had was the vague "timestamp" column. So we'll use it for both.
43   created: timestamp
44   changed: timestamp
45   uid: uid
46 destination:
47   plugin: entity:file