centralize upload for all file types