Remove upload tmp file.
Add test. Edit code style.