API:Stashimageinfo
| Stashimageinfo | ||
|---|---|---|
| Returns file information for stashed files. This module cannot be used as a Generator. |
||
| Prefix | sii | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
Returns file information for stashed files. Although it appears under its own key, stashimageinfo, rather than the pages key like other property modules, the output of this module is otherwise identical to that of API:Imageinfo.
Parameters[edit]
siifilekey: The filekey(s) to search for, as returned by API:Upload. 1.18+siisessionkey: The sessionkey(s) to search for, as returned by API:Upload. (Deprecated in 1.18)siiprop: Which properties to get for each revision: (Default:timestamp|url)timestamp: The time and date of the revision.canonicaltitle: The canonical title of the image file. 1.23+url: URLs of the image and its description page.size: The image's size in bytes, plus width and height. A page count is also returned if the image is in a format that supports multiple pages.dimensions: (Alias forsize)sha1: The image's SHA-1 hash.mime: The image's MIME type.thumbmime: The image thumbnail's MIME type (for use with theiiurlparameters).metadata: Exif metadata for the image, if available. See File metadata handling for information on file metadata handling in MediaWiki.commonmetadata: Generic metadata for the file format, if available. 1.23+extmetadata: HTML metadata from extensions which implement the GetExtendedMetadata hook. Also contains most ofmetadata, but in a somewhat standardized format. 1.23+bitdepth: The bit depth of the image.
siiurlwidth: Ifiiprop=urlis set, a URL to an image scaled to this width will be returned as well inthumburlalong withthumbwidthandthumbheight. Old versions of images can't be scaled.siiurlheight: Similar toiiurlwidth.siiurlparam: The thumb parameter string. Allows optional specification of other parameters than width and height (like page number for PDFs). Format of the field varies with image format. PDF uses a format like page<number>-<width>px (e.g., page3-140px). Generally the part before the filename in the url of a thumbnail. 1.18+
| The following documentation is the output of Special:ApiHelp/query+stashimageinfo, automatically generated by the pre-release version of MediaWiki that is running on this site (MediaWiki.org). |
prop=stashimageinfo (sii)
- This module requires read rights.
- Source: MediaWiki
- License: GPL-2.0-or-later
Returns file information for stashed files.
- siifilekey
Key that identifies a previous upload that was stashed temporarily.
- Separate values with | or alternative. Maximum number of values is 50 (500 for bots).
- siisessionkey
- Deprecated.
Alias for siifilekey, for backward compatibility.
- Separate values with | or alternative. Maximum number of values is 50 (500 for bots).
- siiprop
Which file information to get:
- timestamp
- Adds timestamp for the uploaded version.
- canonicaltitle
- Adds the canonical title of the file.
- url
- Gives URL to the file and the description page.
- size
- Adds the size of the file in bytes and the height, width and page count (if applicable).
- dimensions
- Alias for size.
- sha1
- Adds SHA-1 hash for the file.
- mime
- Adds MIME type of the file.
- thumbmime
- Adds MIME type of the image thumbnail (requires url and param siiurlwidth).
- metadata
- Lists Exif metadata for the version of the file.
- commonmetadata
- Lists file format generic metadata for the version of the file.
- extmetadata
- Lists formatted metadata combined from multiple sources. Results are HTML formatted.
- bitdepth
- Adds the bit depth of the version.
- badfile
- Adds whether the file is on the MediaWiki:Bad image list
- Values (separate with | or alternative): timestamp, canonicaltitle, url, size, dimensions, sha1, mime, thumbmime, metadata, commonmetadata, extmetadata, bitdepth, badfile
- Default: timestamp|url
- siiurlwidth
If siiprop=url is set, a URL to an image scaled to this width will be returned.
For performance reasons if this option is used, no more than 50 scaled images will be returned.
- Type: integer
- Default: -1
- siiurlheight
Similar to siiurlwidth.
- Type: integer
- Default: -1
- siiurlparam
A handler specific parameter string. For example, PDFs might use page15-100px. siiurlwidth must be used and be consistent with siiurlparam.
- Default: (empty)
- Returns information for a stashed file.
- api.php?action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567 [open in sandbox]
- Returns thumbnails for two stashed files.
- api.php?action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&siiurlwidth=120&siiprop=url [open in sandbox]