In Drupal 8 there is file migration template core/modules/file/migration_templates/d6_file.yml
To Start copy the template into your custom migration module config/install folder and change the id, label and the migration_group:
You can name the file like this : migrate_plus.migration.yoursite_file.yml
Example is given in https://github.com/lomasgupta/custom_migration/tree/staging
Now we can look into the code in the yml file :
Under source the ‘source_base_path’ is full location of your drupal 6 site.Rest we can keep as it is. Don’t forget the step to uninstall and install the cusom_module which we have done in the previous blog titled “Migration of taxonomies and vocabs Drupal6/7 to drupal 8 with custom migration” .
Once all this done we are ready to migration files/images
Now do drush ms on your terminal. You will get output something as highlighted in the screenshot.
Now to run the migration to drush mi program_image. Once the migration is completed the output will be like this
Processed 562 items (562 created, 0 updated, 0 failed, 0 ignored) - done with 'program_image'