Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Warning: This interface is deprecated as of Firefox 26. Please use Downloads.jsm instead.

This interface describes a download object. Download objects are used by the Download Manager (see nsIDownloadManager to manage files that are queued to download, being downloaded, and finished being downloaded.)
Inherits from: nsITransfer Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

Note: Once the download is completed, the Download Manager stops updating the nsIDownload object. Completed states are nsIDownloadManager::DOWNLOAD_FINISHED, nsIDownloadManager::DOWNLOAD_FAILED, and nsIDownloadManager::DOWNLOAD_CANCELED.

Attributes

Attribute Type Description
amountTransferred long long The number of bytes downloaded so far. Read only.
cancelable nsICancelable An object that can be used to cancel the download. Once the download is complete, this value is set to null. Read only.
displayName AString A user-readable description of the transfer. Read only.
id unsigned long The ID by which the download is identified uniquely in the database - not globally unique. For example, a private download and a public one might have identical ids. Can only be safely used for direct database manipulation in the database that contains this download. Use the guid property instead for safe, database-agnostic searching and manipulation. Read only. Deprecated since Gecko 19.0
guid AString The guid of the download that is stored in the database. Has the form of twelve alphanumeric characters. Read only.
MIMEInfo nsIMIMEInfo Provides the targets relevant MIME information, including its MIME type, helper application, and whether or not the helper should be executed automatically once the download is complete. Read only. Optional
percentComplete long The percentage of the file transfer that has been completed, or -1 if the file's size is unknown. Read only.
referrer nsIURI The referrer URI of the download. This is only valid for HTTP downloads, and can be null. Read only.
resumable boolean Indicates if the download can be resumed after being paused or not. This is only the case if the download is over HTTP/1.1 or FTP and if the server supports it. Read only.
size long long The total size of the file in bytes, or LL_MAXUINT if the file's size is unknown. Read only.
source nsIURI The source URI of the download. Read only.
speed double The downloads transfer speed in bytes per second. Read only.
startTime long long The time at which the transfer was started. Read only.
state short The downloads current state. See nsIDownloadManager.Constants. Read only.
target nsIURI The target of the transfer. Read only.
targetFile nsILocalFile Indicates the location at which the downloaded file will be (or is, if the download is complete) stored. Read only.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, P.A., kmaglione, wesj, trevorh, Kohei, Graememcc
 Last updated by: Sheppy,