Network & Downloads

Set Download Filename

Set download filename and path.

Set download filename and path.

Intercepts the browsers download filename determination event and assigns a custom file path for the download, ensuring the file is saved with the specified name and overwriting any existing file if necessary, then removes the listener after handling the first download.

Examples

GPAL Fluent: High-level fluent C# API

browser.WithSelector(selector).LeftClickAndDownload(GPALFile gPalFileToDownload)

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.SetDownloadFilename(string path);

Puppeteer Client: Puppeteer-style C# client

//The PuppeteerClient method for this endpoint is named SaveTo rather than SetDownloadFilename.

browser.PuppeteerClient.SaveTo(string downloadPath).Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.SetDownloadFilename(string downloadPath, string sessionId);

REST Client: Direct REST/HTTP client

//'path' refers to both the destination of the downloaded file as well as its intened filename

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.SetDownloadFilename).WithDownloadFile(string path).Execute();