Page 1 of 1
ServerComponent - Image or file
Posted: Wed Aug 17, 2022 6:57 pm
by dilfich
Hi, please show me how to create a link to an image or file.
Is it possible or not?

Re: ServerComponent - Image or file
Posted: Thu Aug 18, 2022 1:25 pm
by salvadordf
I just uploaded a new version of the SimpleServer demo that sends an HTML response with an embedded image.
https://github.com/salvadordf/CEF4Delphi/blob/326b2a7405a44ce19b8ea41ac769db5763e13789/demos/Delphi_VCL/SimpleServer/uSimpleServer.pas#L173
Adding links to that HTML response is really simple :
https://www.w3schools.com/html/html_links.asp
..but you will need to modify TSimpleServerFrm.CEFServerComponent1HttpRequest to send a different response when the browser requests the URL in the <A> element.