TMSFNCWebBrowser Download File

hello, with TMSFNCWebBrowser I can do this process below?

procedure TForm1.webbrowserBeforeDownload(Sender: TObject; const browser: ICefBrowser;
const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback);
begin
callback.Cont(ExtractFilePath(ParamStr(0)) + 'DOWNLOADEDFILES' + suggestedName, True);
end;

procedure TForm1.webbrowserDownloadUpdated(Sender: TObject; const browser: ICefBrowser;
const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback);
begin
StatusBar1.Panels[3].Text := downloadItem.FullPath;
if downloadItem.IsComplete then
begin
if FileExists(downloadItem.FullPath) then
begin
loadcurrentFile(downloadItem.FullPath);
PageControl1.ActivePageIndex := 1;
end;
end;
end;

basically it would be: fix a default folder for download, and identify the end of the process and open the downloaded file

there are no properties, BeforeDownload and DownloadUpdated

This is currently not possible. We'll investigate the possibilties. For which platforms specific do you need this?

windows

CaptureDownloads.zip (9.1 KB)

Attached is a sample specifically designed for Windows.

1 Like

it worked perfect, it was exactly what I wanted, thank you very much

1 Like

Is it possible to do this in Android and iOS too?

There are currently no APIs exposed to handle this, and it's also unclear if this is technically possible.