upload feature fixed,needs refactoring