added upload to agent