The problem is due to how browsers work. The first time you POST the page with a file upload, the browser sends all the data, including the file, then returns back HTML to render. If you hit reload (F5) then the browser resends the last POST request meaning resends the file.
In this case it tries to upload a file again, but in other cases such as billign someone or adding a record this can cause duplication. A record could be entered twice or even worse a user charged payment twice.
The way to stop this is to use a pattern called the PRG pattern. The post-redirect-get patter, where after an http post, instead of showing html, you redirect back to a page (either teh same or another).
REF :
file upload .hasfile holds true after post back!!
block / disabled referesh funtion F5 key