Error message when uploading anything other than CSV file

Hi there!
I am fairly new to this and am currently trying to figure out the upload component.

I have successfully figured out how to upload a csv file, however i would like to know if there is a way to show a pop error message when i try to upload anything else other than a csv, where it would say something along the lines of the wrong file type.