Commons:UploadStash

The UploadStash is a feature of MediaWiki where images are stored prior to going live on the site. For example, this is used by UploadWizard to allow users to upload images as the first step and input their descriptions as a second step.

Essentially when uploading with the MediaWiki API you can choose to "stash" a file instead of publishing immediately. You can then use the API to publish the stashed file at a later date.

Chunked upload is always stashed. Non-chunked upload can be either stashed or published directly. When publishing a stashed file there is an option to do it async. This means the file will be processed by the MediaWiki job queue. There may be a delay in processing async requests but they tend to be more reliable for large files because they have longer timeouts.

UploadStash is per user. You can only view your own upload stash not anyone elses. You can view your upload stash at Special:UploadStash. This lets you download the stashed file as well as view a thumbnail. You can only download stashed files that are smaller than 1MiB. You can also use API modules &action=query&list=mystashedfiles and &action=query&prop=stashimageinfo.

Generally stashed filenames follow the following convention: <number of nanoseconds since jan 1 1970 divided by 10 in base 36 when it was uploaded>.<random letters>.<user id>.<extension>

During chunked upload, the file is divided into chunks, and each chunk is uploaded separately. The first chunk is listed in your upload stash, but not subsequent chunks. After the last chunk is uploaded, MediaWiki triggers the assembly process. This joins all the chunks together into a new file with a different name and uploads that, deleting the old file.

Files are removed from the UploadStash after they are published. Files which are not published within 48 hours[1] are automatically deleted.

See Also edit

  1. On Wikimedia wikis other than Commons this is 6 hours