Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By webchuck on
Drupalers,
I have a large number of files (in the thousands) which I need to add to Drupal. Obviously, I'm not going to do this by hand, so I am writing a script to do this. I have figured out how to create nodes for each document (node_save), but now need to figure out how to attach the files to the node. I looked over upload.module, but didn't understand it well enough to guess which function I needed to call.
Can anyone offer some ideas how I can do this?
Thanks!!!