Click or drag to resize

BrowserClientSetDownloadBehaviorAsync Method

Version 90.6.50
Set the behavior when downloading a file.

Namespace:  CefSharp.DevTools.Browser
Assembly:  CefSharp (in CefSharp.dll) Version: 90.6.50.0 (90.6.50.0)
Syntax
public Task<DevToolsMethodResponse> SetDownloadBehaviorAsync(
	string behavior,
	string browserContextId = null,
	string downloadPath = null
)

Parameters

behavior
Type: SystemString
Whether to allow all or deny all download requests, or use default Chrome behavior ifavailable (otherwise deny). |allowAndName| allows download and names files according totheir dowmload guids.
browserContextId (Optional)
Type: SystemString
BrowserContext to set download behavior. When omitted, default browser context is used.
downloadPath (Optional)
Type: SystemString
The default path to save downloaded files to. This is requred if behavior is set to 'allow'or 'allowAndName'.

Return Value

Type: TaskDevToolsMethodResponse
returns System.Threading.Tasks.Task<DevToolsMethodResponse>
See Also