How to check for the Local file deletion in flask before upload

Multi tool use
How to check for the Local file deletion in flask before upload
I am writing a web application where the user can upload the file.
Now the question is how to check whether the file exists or not before file upload.
In my case, I press the browse button in html page, select the file for upload now I delete the local file and press the upload button.
There is no response from the website it keeps on running
how to solve this.
P.S Give reason before downvoting
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.