'name' is the file name from the user machine, you need tmp_name for what is called when uploaded, assuming you haven't renamed it and you have put it in the path you designate above, and there's no need for basename().
And please refer to the manual section: Handling file uploads