docs: add more info about downloadItem.setSavePath api (#25402)

* docs: add more info about downloadItem.setSavePath api

add more info about downloadItem.setSavePath api

* Update docs/api/download-item.md

^_^

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
liulun 2020-09-23 10:02:05 +08:00 committed by GitHub
parent 22c6c891be
commit 6aaaabd90f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,7 @@ The `downloadItem` object has the following methods:
* `path` String - Set the save file path of the download item.
The API is only available in session's `will-download` callback function.
If `path` doesn't exist, Electron will try to make the directory recursively.
If user doesn't set the save path via the API, Electron will use the original
routine to determine the save path; this usually prompts a save dialog.