handle directory upload