> * First, make sure this is a JPG > lcString=FILETOSTR(This.cSavePath) > IF SUBSTR(lcString,1,4)<>CHR(255)+CHR(216)+CHR(255)+CHR(0) > This.cHtml='This is not a JPG file.' > ERASE (This.cSavePath) > RETURN .F. > ENDIF >Ok, this small change did it:
* First, make sure this is a JPG lcString=FILETOSTR(This.cSavePath) IF SUBSTR(lcString,1,2)<>CHR(0xFF)+CHR(0xD8) This.cHtml='This is not a JPG file.' ERASE (This.cSavePath) RETURN .F. ENDIF