Upload media files to Amazon S3

So I worked out what I was looking for. It seems that all images, when edited or uploaded, have something passed through wp_update_attachment_metadata and so I can hook into that to get the info I need.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)