I have drupal 7 installation with file field + video field(and media module). I can change where to upload files in video field setting(default: videos/original). I'm trying to do stuff to videos after file is uploaded and node is saved. Is there a hook I can use to achieve this?
What I want Exactly: Make a copy of the videos to 2 different servers via ftp and some transcode codes. First file needs to be uploaded to drupal folder and after that I need my code to run. sometimes videos need to be converted using ffmpeg(move to videos/converted) and then I run my code.
I've found these hooks but none of theme get called after uploading files or even after saving the node:
hook_file_copy($file, $source)
hook_file_move($file, $source)
how about this one?
hook_field_insert or hook_node_insert