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

quicksketch’s picture

Look at the filefield_meta.module for examples of how you can use hook_file_save() to react to new files being uploaded.

Agileware’s picture

Status: Active » Fixed

Of course, thanks!

And perfect timing too as I am just now coming back to this task.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Agileware’s picture

Just as a note for others it seems to be hook_file_insert() instead of hook_file_save().