I'm trying to migrate private files (file migration), the problem is even I set file_replace to 'FILE_EXISTS_REUSE' the files are still duplicated (it adds _1 or _2, and so on.). Here is my mapping:


Please help!

  • Are you sure you should not use $this->addFieldMapping('file_replace')->defaultValue(FILE_EXISTS_REUSE);?
    – apaderno
    Dec 16, 2015 at 12:13
  • I've already tried that, but still no good.
    – japhfortin
    Dec 16, 2015 at 12:20

2 Answers 2


This solved it for me. The documentation at this link has been updated to show that you need to use the class prefix:



Maybe try:

$this->addFieldMapping('field_name', 'field_name');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.