I've got a simple feature which creates a content type with title and fields - subtitle, body, images a documents. The main thing is that I use media module, so I actually attach file entities - image and document to the content type.

Now I'm trying to create a 2nd feature which is going to migrate a demo content in when I switch it on and out when I switch it off. It uses migrate module to import data, and the feature includes a folder with images and .csv file with source data.

I've got it working for title, subtitle, and body, but I don't know how to make it work for files. I built it up on Panopoly distro and used Panopoly App - News Demo as an example code. Unfortunately, News Demo uses a classic image field to import images within the app, and it doesn't seem to work with file entities.

Could anyone share a piece of code for this case, please?


  • Hi, did you solve it? – Shyghar Oct 31 '17 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.