Improved file upload path method