Upload hook


#1

Hi,

Is there a hook I can hook onto after a file upload where I can set the privacy column in wp_rt_rtm_media to the value I want? Or do I have to write my own SQL-query to edit this field?

I have moderation on, so it is set to 80, but I have to set the field to another value for custom functionality.

Thanks in advance.


#2

Hi @lars,

There is a hook after the media uploaded i.e rtmedia_after_add_media. You can use this hook to update the media privacy as soon as its uploaded. This hook is located in the file controllers/media/RTMediaMedia.php.


#3