Hello

Recently I send email with embedded png image and image is inserted but not displayed. Checking mail I found png is inserted as "Content-Type: application/octet-stream;"
Was possible include next changes. With it png images are correctly shown.

Regards

Xavi


Units I modified :

OverbyteIcsHttpProt.pas

constructor THttpCli.Create(Aowner:TComponent);
Line 1328 changed
from :                                      'image/jpeg, image/pjpeg, */*';
to : 'image/jpeg, image/pjpeg, image/png, */*';


OverbyteIcsMimeUtils.pas

function FilenameToContentType(FileName : String) : String;
....
    else if (Ext = 'jpg') or (Ext = 'jpeg') then
        Result := 'image/jpeg'
// added start
    else if Ext = 'png' then
        Result := 'image/png'
// added end
    else if Ext = 'txt' then
        Result := 'text/plain'

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to