YH: Fix: There are cases where any user can attach a Photo file which has no preview or  attach a file by changing  an invalid extension to a valid extension – for e.g.  doc to jpg  and try to upload the this jpg file. This causes an error message.