How to check if filename uploaded, already exists?

I am trying to prevent the user, from uploading a file that already exists with the same name. How can I prevent them from doing so?
image.png
Was this page helpful?