Added upload media function

@themightychris please merge asap
@aharley40 why did you break the header formatting? Please revert this change before I accept this PR