added upload function for files