From d7e45c44de1d2b1b24bfedc3c47c512cc0487df0 Mon Sep 17 00:00:00 2001 From: Debbie O'Brien Date: Wed, 7 Sep 2022 12:41:12 +0200 Subject: [PATCH] docs: remove api ref and improve text (#17099) --- docs/src/downloads.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/docs/src/downloads.md b/docs/src/downloads.md index 337dea74f2..9031b8816e 100644 --- a/docs/src/downloads.md +++ b/docs/src/downloads.md @@ -3,13 +3,9 @@ id: downloads title: "Downloads" --- -:::note -For uploading files, see the [uploading files](./input.md#upload-files) section. -::: -For every attachment downloaded by the page, [`event: Page.download`] event is emitted. All these attachments are going -to be downloaded into a temporary folder. You can obtain the download url, file system path and payload stream using -the [Download] object from the event. + +For every attachment downloaded by the page, [`event: Page.download`] event is emitted. All these attachments are downloaded into a temporary folder. You can obtain the download url, file system path and payload stream using the [Download] object from the event. You can specify where to persist downloaded files using the [`option: downloadsPath`] option in [`method: BrowserType.launch`]. @@ -107,9 +103,8 @@ page.on("download", lambda download: print(download.path())) page.Download += (sender, download) => Console.WriteLine(download.Url); ``` -Note that handling the event forks the control flow and makes script harder to follow. Your scenario might end while you -are downloading a file since your main control flow is not awaiting for this operation to resolve. +Note that handling the event forks the control flow and makes the script harder to follow. Your scenario might end while you are downloading a file since your main control flow is not awaiting for this operation to resolve. -### API reference -- [Download] -- [`event: Page.download`] +:::note +For uploading files, see the [uploading files](./input.md#upload-files) section. +:::