add tmp dir
Refactor upload feature
update template