If you upload a file to the server, during the uploading the file is not completed and if it's parsed it will probably generate errors until the upload is finished.
It would be better on my opinion to automatically upload the file with a different and unique name and rename it with the right name only after that the upload is completed and the old file is deleted.
I would keep the old file during the upload process to avoid parsing of incomplete files.
If you upload a file to the server, during the uploading the file is not completed and if it's parsed it will probably generate errors until the upload is finished.
It would be better on my opinion to automatically upload the file with a different and unique name and rename it with the right name only after that the upload is completed and the old file is deleted. I would keep the old file during the upload process to avoid parsing of incomplete files.