Manual:uploadstash table
↑ Manual:Contents | MediaWiki database layout | uploadstash table |
MediaWiki version: | ≥ 1.18 |
The uploadstash table stores information about newly uploaded files before they're moved into the actual filestore. It contains information on incomplete uploads; these can e.g. happen when the user left the upload page before the upload completed. The cleanupUploadStash.php maintenance script can be used to remove orphaned entries from this table.
Fields[edit | edit source]
us_id[edit | edit source]
Primary key.
us_user[edit | edit source]
The user who uploaded the file.
us_key[edit | edit source]
File key. this is how applications actually search for the file. This might go away, or become the primary key.
us_orig_path[edit | edit source]
The original path.
us_path[edit | edit source]
The temporary path at which the file is actually stored.
us_source_type[edit | edit source]
Which type of upload the file came from (sometimes). E.g. "url"
us_timestamp[edit | edit source]
The date/time on which the file was added
us_status[edit | edit source]
E.g. "finished"
us_chunk_inx[edit | edit source]
MediaWiki version: | ≥ 1.19 |
Chunk counter starts at 0, current offset is stored in us_size
us_size[edit | edit source]
File properties from File::getPropsFromPath. These may prove unnecessary.
us_sha1[edit | edit source]
This hash comes from File::sha1Base36(), and is 31 characters
us_mime[edit | edit source]
Combination of [[Manual:Image_table#img_maj
us_props[edit | edit source]
MediaWiki version: | ≥ 1.21 |
Serialized file properties from File::getPropsFromPath
Schema[edit | edit source]
MediaWiki version: | 1.21 |
mysql> describe uploadstash; +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ | us_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | us_user | int(10) unsigned | NO | MUL | NULL | | | us_key | varbinary(255) | NO | UNI | NULL | | | us_orig_path | varbinary(255) | NO | | NULL | | | us_path | varbinary(255) | NO | | NULL | | | us_source_type | varbinary(50) | YES | | NULL | | | us_timestamp | varbinary(14) | NO | MUL | NULL | | | us_status | varbinary(50) | NO | | NULL | | | us_chunk_inx | int(10) unsigned | YES | | NULL | | | us_props | blob | YES | | NULL | | | us_size | int(10) unsigned | NO | | NULL | | | us_sha1 | varbinary(31) | NO | | NULL | | | us_mime | varbinary(255) | YES | | NULL | | | us_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | us_image_width | int(10) unsigned | YES | | NULL | | | us_image_height | int(10) unsigned | YES | | NULL | | | us_image_bits | smallint(5) unsigned | YES | | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ 17 rows in set (0.00 sec)
MediaWiki versions: | 1.19 – 1.20 |
mysql> describe uploadstash; +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ | us_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | us_user | int(10) unsigned | NO | MUL | NULL | | | us_key | varbinary(255) | NO | UNI | NULL | | | us_orig_path | varbinary(255) | NO | | NULL | | | us_path | varbinary(255) | NO | | NULL | | | us_source_type | varbinary(50) | YES | | NULL | | | us_timestamp | varbinary(14) | NO | MUL | NULL | | | us_status | varbinary(50) | NO | | NULL | | | us_chunk_inx | int(10) unsigned | YES | | NULL | | | us_size | int(10) unsigned | NO | | NULL | | | us_sha1 | varbinary(31) | NO | | NULL | | | us_mime | varbinary(255) | YES | | NULL | | | us_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES | | NULL | | | us_image_width | int(10) unsigned | YES | | NULL | | | us_image_height | int(10) unsigned | YES | | NULL | | | us_image_bits | smallint(5) unsigned | YES | | NULL | | +-----------------+--------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ 16 rows in set (0.00 sec)
![]() |
Engines: MySQL – Oracle – PostgreSQL – SQLite Technical documentation: Schema (tables) – API property associations – Field prefixes – Primary key storage in other fields – Wikimedia extension tables Configuration: Settings – Sharing Development: Access – Optimization – Policy – Updater – Extension schema updates – Patch file Core tables: archive – category – categorylinks – change_tag – config – externallinks – filearchive – hitcounter – image – imagelinks – interwiki – iwlinks – ipblocks – job – l10n_cache – langlinks – logging – log_search – msg_resource – msg_resource_links – module_deps – objectcache – oldimage – page – pagelinks – page_props – page_restrictions – protected_titles – querycache – querycachetwo – querycache_info – recentchanges – redirect – revision – searchindex – sites – site_stats – tag_summary – templatelinks – text – transcache – updatelog – uploadstash – user – user_former_groups – user_groups – user_newtalk – user_properties – valid_tag – watchlist |
---|