Change rest api to handle multipart and test uploads