add upload function to mogoose web server