Added and fixed upload.

Added and fixed upload.
I'm going to clean up this function before merging. I'll throw in an async.waterfall or something to make it look a bit less funky.