[development] create nodes with attached files using drupal_execute
Karoly Negyesi
karoly at negyesi.net
Fri Nov 16 06:13:39 UTC 2007
> The form uses drupal_execute to generate new CCK nodes.
> $values['file']['field_object_file_upload'][0] =
You have a problem here -- files are stored in FILES not in POST by PHP hence Form API does not deal with files at all -- form_values is a derived from POST.You need to handle uploads separately. Also, just populating FILES is not enough if I remember correctly PHP has an internal structure so an upload is not easily emulatable. You yourself will need to put the file on disk, save the entry into {files}... If you figure this out -- maybe with more help from the list -- please post to http://drupal.org/node/191154 -- this seems to be a popular question these days.
More information about the development
mailing list