Created
August 8, 2019 01:46
-
-
Save dinarcon/e46f71ee73962cadfa75f913969ea91e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
destination: | |
plugin: 'entity:file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process: | |
uri: source_column_file_uri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: | |
constants: | |
SOURCE_DOMAIN: 'https://agaric.coop' | |
DRUPAL_FILE_DIRECTORY: 'public://portrait/' | |
plugin: embedded_data | |
data_rows: | |
- photo_id: 'P01' | |
photo_url: 'sites/default/files/2018-12/micky-cropped.jpg' | |
- photo_id: 'P02' | |
photo_url: '' | |
- photo_id: 'P03' | |
photo_url: 'sites/default/files/pictures/picture-94-1480090110.jpg' | |
- photo_id: 'P04' | |
photo_url: 'sites/default/files/2019-01/clayton-profile-medium.jpeg' | |
ids: | |
photo_id: | |
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psf_destination_filename: | |
- plugin: callback | |
callable: basename | |
source: photo_url | |
- plugin: skip_on_empty | |
method: row | |
message: 'Cannot import empty image filename.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psf_destination_full_path: | |
- plugin: concat | |
source: | |
- constants/DRUPAL_FILE_DIRECTORY | |
- '@psf_destination_filename' | |
- plugin: urlencode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psf_source_image_path: | |
- plugin: concat | |
delimiter: '/' | |
source: | |
- constants/SOURCE_DOMAIN | |
- photo_url | |
- plugin: urlencode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uri: | |
plugin: file_copy | |
source: | |
- '@psf_source_image_path' | |
- '@psf_destination_full_path' | |
file_exists: 'rename' | |
move: FALSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment