Rules react on event for file_managed table? Im looking for a solution to be able to create a "react on event" in rules for when a file is added to the file_managed table. Is it possible and if so, how?
I have looked and it is not an easy thing to accomplish with rules/drupal strictly. So instead I took a different approach that works great :)

I have a separate database that I use for various things which is added through my settings.php so available to drupal. I have added a newfiles table to this db. I then use on the file_managed table a trigger:

CREATE TRIGGER `newfile_trigger` AFTER INSERT ON `file_managed` FOR EACH ROW INSERT INTO otherdb.newfiles (fid,uid,filename,uri,filemime) VALUES(NEW.fid,NEW.uid,NEW.filename,NEW.uri,NEW.filemime);


In my custom module I then have a hook_cron that looks up the entries on the newfiles table every minute, performs the necessary functions and then deletes the row.