Hi, please show me how to create a link to an image or file.
Is it possible or not?
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
- salvadordf
- Posts: 4067
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: ServerComponent - Image or file
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.
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.