fix directory upload