There are some libraries which do JPEG decoding in Pure JavaScript.
E.g. https://github.com/notmasteryet/jpgjs (there are others)
You can simply decode the FileReader fed data in your JavaScript code and see if the output is sane.
Depending of the degree of corruption, what cases you want to trap, it should be possible on client-side.