DownloadItem
Functions
The Content-Disposition field from the response header.
The file name of the download item.
Last-Modified header value.
The files mime type.
The received bytes of the download item.
Returns the object previously set by downloadItem.setSaveDialogOptions(options)
.
The save path of the download item. This will be either the path set via downloadItem.setSavePath(path)
or the path selected from the shown save dialog.
Number of seconds since the UNIX epoch when the download was started.
The current state. Can be progressing
, completed
, cancelled
or interrupted
.
The total size in bytes of the download item.
The complete URL chain of the item including any redirects.
Whether the download has user gesture.
This API allows the user to set custom options for the save dialog that opens for the download item by default. The API is only available in session's will-download
callback function.
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.