Classes
- BookletLayout
Encapsulates the process of uploading a file to MediaWiki using the
upload model.- Dialog
- Controls a
BookletLayout.
Properties
Statestatic
#
Properties:
| Name | Type | Description |
|---|---|---|
NEW |
Upload not yet started |
|
WARNING |
Upload finished, but there was a warning |
|
ERROR |
Upload finished, but there was an error |
|
UPLOADING |
Upload in progress |
|
STASHED |
Upload finished, but not published, call #finishStashUpload |
|
UPLOADED |
Upload finished and published |
- Source:
Methods
finishStashUpload() → {jQuery.Promise}
#
getApi() → {jQuery.Promise.<mw.Api>}
#
getAutoText() → {boolean}
#
Get whether the file page wikitext should be generated server-side.
Returns:
- Type
- boolean
- Source:
getBasename(path) → {string}
#
Gets the base filename from a path name.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
string |
Returns:
- Type
- string
- Source:
getChunkSize() → {number}
#
Get the chunk size used for chunked uploads, in bytes.
Returns:
- Type
- number
- Source:
getComment() → {string}
#
Get the current value of the edit comment for the upload.
Returns:
- Type
- string
- Source:
getCopyStatus() → {string}
#
getFile() → {HTMLInputElement|File|Blob}
#
getFilename() → {string}
#
Get the filename, to be finalized on upload.
Returns:
- Type
- string
- Source:
getIgnoreWarnings() → {boolean}
#
Check if upload warnings will be ignored when publishing.
Returns:
- Type
- boolean
- Source:
getImageInfo() → {Object|undefined}
#
undefined}
#
Get the imageinfo object for the finished upload. Only available once the upload is finished! Don't try to get it beforehand.
Returns:
- Type
-
Object
|
undefined
- Source:
getLicense() → {string}
#
getSource() → {string}
#
getState() → {mw.Upload.State}
#
getStateDetails() → {string}
#
getText() → {string}
#
Get the text of the file page, to be created on file upload.
Returns:
- Type
- string
- Source:
getWatchlist() → {boolean}
#
Get the boolean for whether the file will be watchlisted after upload.
Returns:
- Type
- boolean
- Source:
setAutoText(autotext)
#
Set whether the file page wikitext should be generated server-side from the comment, license, copyright status and source, overriding the text.
Parameters:
| Name | Type | Description |
|---|---|---|
autotext |
boolean |
- Source:
Set whether the file page wikitext should be generated server-side from the comment, license, copyright status and source, overriding the text.
setChunkSize(chunkSize)
#
Set the chunk size used for chunked uploads, in bytes.
Parameters:
| Name | Type | Description |
|---|---|---|
chunkSize |
number |
- Source:
setComment(comment)
#
Set the edit comment for the upload.
Parameters:
| Name | Type | Description |
|---|---|---|
comment |
string |
- Source:
setCopyStatus(copyStatus)
#
Set the copyright status for the upload.
Parameters:
| Name | Type | Description |
|---|---|---|
copyStatus |
string |
- Source:
setFile(file)
#
Set the file to be uploaded.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
HTMLInputElement | File | Blob |
- Source:
setFilekey(filekey)
#
Set the stashed file to finish uploading.
Parameters:
| Name | Type | Description |
|---|---|---|
filekey |
string |
- Source:
setFilename(filename)
#
Set the filename, to be finalized on upload.
Parameters:
| Name | Type | Description |
|---|---|---|
filename |
string |
- Source:
setFilenameFromFile()
#
Sets the filename based on the filename as it was on the upload.
- Source:
setIgnoreWarnings(ignoreWarnings)
#
Set whether to ignore upload warnings when publishing.
Parameters:
| Name | Type | Description |
|---|---|---|
ignoreWarnings |
boolean |
- Source:
setLicense(license)
#
Set the license template for the upload.
Parameters:
| Name | Type | Description |
|---|---|---|
license |
string |
- Source:
setSource(source)
#
Set the source for the upload.
Parameters:
| Name | Type | Description |
|---|---|---|
source |
string |
- Source:
setState(state, stateDetails)
#
Sets the state and state details (if any) of the upload.
Parameters:
| Name | Type | Description |
|---|---|---|
state |
mw.Upload.State | |
stateDetails |
Object |
- Source:
setText(text)
#
Set the text of the file page, to be created on file upload.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string |
- Source:
setWatchlist(watchlist)
#
Set whether the file should be watchlisted after upload.
Parameters:
| Name | Type | Description |
|---|---|---|
watchlist |
boolean |
- Source: