Handle file upload in given directory