See also Browser.StartDownload().
In CEF 3 downloads are handled automatically if ApplicationSettings.downloads_enabled
is set to True (default). A default SaveAs
file dialog provided by OS is displayed. If the download is aborted by user LoadHandler.OnLoadError
will get called with errorCode ERR_ABORTED.
There is no download progress available. If you need such feature you will have to create a custom implementation of downloads. It would need to be investigated which callbacks from client handlers would allow for such implementation. Take a look at RequestHandler.OnBeforeBrowse
, OnBeforeResourceLoad
, and/or ResourceHandler.
On Linux there is a bug and ERR_ABORTED is reported even for successful downloads. See the comments in the wxpython.py example.
A download handler with callbacks like OnBeforeDownload
and
OnDownloadUpdated
may be exposed to CEF Python in the future.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。