Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

ServerComponent - Image or file

Post Reply
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

ServerComponent - Image or file

Post by dilfich »

Hi, please show me how to create a link to an image or file.
Is it possible or not? :?
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ServerComponent - Image or file

Post 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.
Post Reply