Fixed a couple of bugs in the add/get media service and upload service.