added upload option to curl context