A few minutes ago I was trying to upload an image to the chat. By mistake, I chose
asdasdgsdfg.png instead of
asdasdgsdff.png and ended up uploading something totally different. I know I should be sensibly naming my files, but it would be nice to have a preivew of the selected image just before you click "Upload".
I think this is possible using the File API. Actually, MDN has an example of doing just that.