I'm currently trying to add the ability to upload files (photos, etc.) to Amazon S3. The majority of our blog users use Windows Live Writer to write their posts because they are most familiar with it (as we are switching from another blog system to WP MU).
Now the issue is, I have to hack away at the xmlrpc.php file. I just want some opinions if what I am doing is the best way (as I am still not familiar with WP).
In the mw_newMediaObject function, I see
do_action('xmlrpc_call', 'metaWeblog.newMediaObject');
which I assume is a hook for the uploading of files. But the hook occurs before the upload. So basically what I did is comment some of the code so that it does the following..
- upload the file temporary to the blog server
- copy it to S3
- delete the file on the blog server
- return the S3 url path
Is there any other way? I would ideally like to make a plugin or some sort. Because the issue of updating means, I have to keep replacing the xmlrpc.php and keep track of it changes/updates.