How to Map files if I have fid in Drupal 6 table and field in Drupal 7 content type? I have a drupal 6 database in which custom table is used to store the details. In the custom table a column fid contains the fid of file.

I have migrated the files and it migrated successfully. I mapped the node fields to that fid. I have added the following code : 

$this-&gt;addFieldMapping('field_image', 'fid')-&gt;sourceMigration('ExFiles');


It showing me following message : 

The specified file 3424 could not be copied to public://3424.


I want to know how to map files from custom table field?
I think you also need to specify the file_class:

$this-&gt;addFieldMapping('field_image', 'fid')
  -&gt;sourceMigration('ExFiles');

$this-&gt;addFieldMapping('field_image:file_class')
  -&gt;defaultValue('MigrateFileFid');


This is explained in the file migration docs; without the class, the source is assumed to be a URI and not a fid.