refactoring
upload API