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.
Currently I have an external command line program that parses information out of files uploaded to a CCK file field.
I do this in a custom module in hook_nodeapi() in the presave op.
Is there a way I can to this at the time of the upload instead of when saving the node (potentially so I can update some other fields of the node via AJAX/AHAH/jQuery).
I have looked for ways to hook into the upload process but have had no luck so far.
Comments
Comment #1
quicksketchLook at the filefield_meta.module for examples of how you can use hook_file_save() to react to new files being uploaded.
Comment #2
Agileware CreditAttribution: Agileware commentedOf course, thanks!
And perfect timing too as I am just now coming back to this task.
Comment #4
Agileware CreditAttribution: Agileware commentedJust as a note for others it seems to be hook_file_insert() instead of hook_file_save().