d7_file_private.yml

Same filename in other branches
  1. 9 core/modules/file/migrations/d7_file_private.yml
  2. 8.9.x core/modules/file/migrations/d7_file_private.yml
  3. 11.x core/modules/file/migrations/d7_file_private.yml
core/modules/file/migrations/d7_file_private.yml

File

core/modules/file/migrations/d7_file_private.yml

View source
  1. id: d7_file_private
  2. label: Private files
  3. audit: true
  4. migration_tags:
  5. - Drupal 7
  6. - Content
  7. source:
  8. plugin: d7_file
  9. scheme: private
  10. constants:
  11. # source_base_path must be set by the tool configuring this migration.
  12. # It represents the fully qualified path relative to which uris in the files
  13. # table are specified, and must end with a /. See source_full_path
  14. # configuration in this migration's process pipeline as an example.
  15. source_base_path: ''
  16. process:
  17. # If you are using this file to build a custom migration consider removing
  18. # the fid field to allow incremental migrations.
  19. fid: fid
  20. filename: filename
  21. source_full_path:
  22. -
  23. plugin: concat
  24. delimiter: /
  25. source:
  26. - constants/source_base_path
  27. - filepath
  28. uri:
  29. plugin: file_copy
  30. source:
  31. - '@source_full_path'
  32. - uri
  33. filemime: filemime
  34. status: status
  35. # Drupal 7 didn't keep track of the file's creation or update time -- all it
  36. # had was the vague "timestamp" column. So we'll use it for both.
  37. created: timestamp
  38. changed: timestamp
  39. uid: uid
  40. destination:
  41. plugin: entity:file

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.