

saveAs OptionalĪ boolean that specifies whether to provide a file chooser dialog to allow the user to select a filename ( true), or not ( false). method OptionalĪ string representing the HTTP method to use if the url uses the HTTP protocol. This means that it will only appear in the download manager for any private windows that are currently open. incognito OptionalĪ boolean: if present and set to true, then associate this download with a private browsing session. Attempting to use a forbidden header throws an error. The headers that are forbidden by XMLHttpRequest and fetch cannot be specified, however, Firefox 70 and later enables the use of the Referer header. Each header is represented as a dictionary object containing the keys name and either value or binaryValue. If the URL uses the HTTP or HTTPS protocols, an array of objects representing additional HTTP headers to send with the request. If omitted, this value will default to the filename already given to the download file, and a location immediately inside the downloads directory. Absolute paths, empty paths, path components that start and/or end with a dot (.), and paths containing back-references (. filename OptionalĪ string representing a file path relative to the default downloads directory - this provides the location where you want the file to be saved, and what filename you want to use. Use requires the "cookies" API permission. If omitted, the default cookie store is used. The cookie store ID of the contextual identity the download is associated with. conflictAction OptionalĪ string representing the action you want taken if there is a filename conflict, as defined in the downloads.FilenameConflictAction type (defaults to "uniquify" when it is not specified). However, if the download fails due to file-related, network-related, user-related, or other error, that error is reported.Ī string representing the post body of the request.

true, the download continues when an HTTP error is encountered and the HTTP server error is not reported.false, the download is canceled when it encounters an HTTP error.Using this flag, for example, enables the download of server error pages. It can contain the following properties: allowHttpErrors OptionalĪ boolean flag that enables downloads to continue even if they encounter HTTP errors.

Differences between API implementationsĪn object specifying what file you wish to download, and any other preferences you wish to set concerning the download.
