Guest User

Untitled

a guest
May 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. dependencies:
  2. module:
  3. - file
  4. id: migrate_csv_articles_images
  5. label: 'Migrate Images for the articles from the csv file'
  6. migration_group: null
  7. source:
  8. constants:
  9. source_base_path: '/Library/WebServer/Documents/drupal/modules/custom/migrate_csv/assets/pictures'
  10. uri_file: 'public://images/pictures/'
  11. plugin: csv
  12. track_changes: true
  13. # Full path to the file.
  14. path: '/Library/WebServer/Documents/drupal/modules/custom/migrate_csv/assets/csv/articles.csv'
  15. header_row_count: 1
  16. keys:
  17. - name
  18. column_names:
  19. 3:
  20. name: Picture
  21. process:
  22. source_full_path:
  23. -
  24. plugin: concat
  25. delimiter: /
  26. source:
  27. - constants/source_base_path
  28. - name
  29. -
  30. plugin: urlencode
  31. uri_file:
  32. -
  33. plugin: concat
  34. delimiter: /
  35. source:
  36. - constants/uri_file
  37. - name
  38. -
  39. plugin: urlencode
  40. filename: name
  41. uri:
  42. plugin: file_copy
  43. source:
  44. - '@source_full_path'
  45. - '@uri_file'
  46. destination:
  47. plugin: 'entity:file'
  48. migration_dependencies:
  49. required: { }
  50. optional: { }
Add Comment
Please, Sign In to add comment