Fpcef Lazarus download file [solved] lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Luciano Andress Martini · 2016-02-02 18:58 Good morning people, i am using fpcef web browser engine, and i need to make the browser download files when the user click on it, but nothing happens. What i need to configure or program to get that working? I found this on cef3intf but i don't know how to use it?   ICefBeforeDownloadCallback = interface(ICefBase) ['{5A81AF75-CBA2-444D-AD8E-522160F36433}']     procedure Cont(const downloadPath: ustring; showDialog: Boolean);   end; ---------------------------------------------------------------------- Luciano Andress Martini · 2016-02-02 20:14 Yes its working!!! It is very simple, do one click on the Tchromium object of your browser, then click on "Events"  select the option OnBeforeDownload twice, so in the code for this event just do something like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i         procedure TForm1.browserBeforeDownload(Sender: TObject;  const Browser: ICefBrowser; const downloadItem: ICefDownloadItem;  const suggestedName: ustring; const callback: ICefBeforeDownloadCallback);begin        callback.Cont(Concat(GetUserDir(),suggestedName),true);end;   This is the way to use the IcefBeforeDownloadCallback constants...! The suggetedName contains the file name and extension automatically on the event. I think i can help more people. ---------------------------------------------------------------------- Luciano Andress Martini · 2016-12-22 18:13 This is good for windows, but it does not work on Linux, any ideas? ---------------------------------------------------------------------- dliw · 2016-12-22 20:52 I just tested and I get this error: Code: [Select]WARNING:file_dialog_manager.cc(332)] No file dialog runner available for this platform This means one needs to implement a file dialog handler. A reference implementation can be found at https://bitbucket.org/chromiumembedded/ cef/src/9928036f638f3a2e1bcccf18c28d940e473f82cb/tests/cefclient/brows er/dialog_handler_gtk.cc In fpCEF this means implementing the OnFileDialog callback. ---------------------------------------------------------------------- Luciano Andress Martini · 2017-01-04 18:36 Good news thanks to the developer it is running for Linux too, take a look at the last version of FPCEF on GIT! But you need to do something more, a example is available on Examples/LCLCefClient (and yes you need the developer last fixes or to rebuild lazarus with new FPCEF version)