added upload capabilities with type check