modify upload tpl and fix bug