I am writing the script for a file migration and am using the MigrateDestinationFile method. I noticed that when I migrate the files that they default to the Document file type. However, I have created custom file types and want the files to be migrated to those file types.

How can I do so?

I was hoping I could do something like this, but it's not working:

$this->destination = new MigrateDestinationFile('custom_file_type');

1 Answer 1


I really wish this was better documented. In addition to the above you need to add a field mapping to the type:

$this->destination = new MigrateDestinationFile('custom_file_type');    

That's it!

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.