not as easy as you might wish.
you have access to the file name through the input's
value property, but there you can only check for the nominal extension (there is no guarantee that a .jpg file is actually a JPEG image, it could be just misnamed).
the file size you could get if your broser supports the
FileReader API.