1

I'm working on a new drupal site which I need to migrate from an existing non-drupal site. I need to be able to import the old blog posts as Article nodes (either through some standard import mechanism or I can write some php to programmatically create the nodes).

However, I'm not sure how to handle creating Image and Video data in a node, especially with the need for transcoding video after creation of the node. So, two questions:

1) How can I programmatically create nodes with binary Image and Video data?

2) When I do create a node with Video data, will the post-create transcoding job be started? I'm using Zencoder to do my transcoding.

I am not using the local filesystem for drupal, I'm storing all of my files in Rackspace Cloud Files, however, I can handle it if I need to use the local filesystem temporarily during import and then manually move things over to Cloud Files. This is only a one-time event.

1

Your best bet is to use the Migrate module. It's got a kinda steep learning curve but plenty of documentation available.

The Migrate Extras module provides integration with the Media module, which could help with the video field specifically.

  • You were NOT kidding about a steep learning curve, phew. I haven't gotten to the Video portion yet, but I'm getting the hang of the migrate module and making progress. – Kenny Wyland Nov 21 '12 at 3:39
  • Awesome, once you get the hang of it its actually pretty sweet! Check out Commerce Kickstart for some nice working examples... – Alex Weber Nov 26 '12 at 20:46
0

Take a look at Datasources.

Datasources provides a framework to describe and manage datasource to import in Drupal.

I've written a generic module to import data into Drupal previously!

Your Answer

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

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