added upload function unittest