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>}
#
getBasename(path) → {string}
#
getComment() → {string}
#
getFile() → {HTMLInputElement|File|Blob}
#
getFilename() → {string}
#
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.
- Source:
Returns:
- Type
-
Object
|
undefined
getState() → {mw.Upload.State}
#
getText() → {string}
#
getWatchlist() → {boolean}
#
Get the boolean for whether the file will be watchlisted after upload.
- Source:
Returns:
- Type
- boolean
setComment(comment)
#
setFile(file)
#
Set the file to be uploaded.
Parameters:
Name | Type | Description |
---|---|---|
file |
HTMLInputElement | File | Blob |
- Source:
setFilekey(filekey)
#
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:
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: