I am migrating from Drupal 7 to Drupal 8 (8.6.9). Both the Drupal 7 and the Drupal 8 site currently run on my local machine. The migration of the public files goes well using:
source: plugin: d7_file scheme: public constants: source_base_path: 'http://www.oldsite.com/' process: fid: - plugin: get source: fid filename: - plugin: get source: filename source_full_path: - plugin: concat delimiter: / source: - constants/source_base_path - filepath - plugin: urlencode uri: - plugin: file_copy source: - '@source_full_path' - uri ... destination: plugin: 'entity:file' migration_dependencies: required: { } optional: { }
The private files are not found using the site URL as source_base_path
so I switched it to /absolute/path/to/private
. However, the files are still not found.
When I check the migration messages it says File '/absolute/path/to/private/filename.png' not found
for each private file. However, if I copy the path and search for the file in the terminal, it’s there so the path is correct.
At first I thought it was due to spaces in the filename but it also happens with files without spaces. For completeness: there are no spaces in the path to the private directory.
Note: not all files are images, many are PDFs.
When searching for this problem I find configurations like above, so I’m out of options.