Improved directory upload