Changed upload functions to return the response