Added uploaddir paramater