Use the action add_attachment
, and look at the MIME type, then do whatever you need:
add_action( 'add_attachment', function( $post_id ) {
if ( 'application/pdf' !== get_post_mime_type( $post_id ) ) {
return;
}
// Here you can update a static file, send a HTTP
// request to the other site or send an email.
});