writing plugin to allow users to upload a logo for secondary blog

I'm working with a friend to write a plugin for users to be able to upload a logo to use on secondary blogs. Is there documentation anywhere that could give us some pointers on what's involved in writing a file to a specific location in the appropriate /blogs.dir folder for a specific blog? All we need to do is upload an image and set a variable to call it in the theme.

Thanks!