You are here

d6_file.yml in Drupal 8

Same filename and directory in other branches
  1. 9 core/modules/file/migrations/d6_file.yml
core/modules/file/migrations/d6_file.yml

File

core/modules/file/migrations/d6_file.yml
View source
  1. # Every migration that references a file by Drupal 6 fid should specify this
  2. # migration as an optional dependency.
  3. id: d6_file
  4. label: Public files
  5. audit: true
  6. migration_tags:
  7. - Drupal 6
  8. - Content
  9. source:
  10. plugin: d6_file
  11. constants:
  12. # The tool configuring this migration must set source_base_path. It
  13. # represents the fully qualified path relative to which URIs in the files
  14. # table are specified, and must end with a /. See source_full_path
  15. # configuration in this migration's process pipeline as an example.
  16. source_base_path: ''
  17. process:
  18. # If you are using both this migration and d6_user_picture_file in a custom
  19. # migration and executing migrations incrementally, it is strongly
  20. # recommended that you remove the fid mapping to avoid potential ID
  21. # conflicts. For that reason, this mapping is commented out by default.
  22. # fid: fid
  23. filename: filename
  24. source_full_path:
  25. -
  26. plugin: concat
  27. delimiter: /
  28. source:
  29. - constants/source_base_path
  30. - filepath
  31. -
  32. plugin: urlencode
  33. destination_full_path:
  34. plugin: file_uri
  35. source:
  36. - filepath
  37. - file_directory_path
  38. - temp_directory_path
  39. - is_public
  40. uri:
  41. plugin: file_copy
  42. source:
  43. - '@source_full_path'
  44. - '@destination_full_path'
  45. filemime: filemime
  46. # No need to migrate filesize, it is computed when file entities are saved.
  47. # filesize: filesize
  48. status: status
  49. changed: timestamp
  50. uid: uid
  51. destination:
  52. plugin: entity:file