Classes
- BookletLayout
Encapsulates the process of uploading a file to MediaWiki using the
mw.ForeignStructuredUploadmodel.
Extends
Methods
finishStashUpload() → {jQuery.Promise}
#
getApi() → {jQuery.Promise.<mw.Api>}
#
Get the mw.Api instance used by this Upload object.
Returns:
- Type
- jQuery.Promise.<mw.Api>
- Inherited from:
- Source:
getBasename(path) → {string}
#
Gets the base filename from a path name.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
string |
Returns:
- Type
- string
- Inherited from:
- Source:
getComment() → {string}
#
Get the current value of the edit comment for the upload.
Returns:
- Type
- string
- Inherited from:
- Source:
getFile() → {HTMLInputElement|File|Blob}
#
getFilename() → {string}
#
Get the filename, to be finalized on upload.
Returns:
- Type
- string
- Inherited from:
- 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
- Inherited from:
- Source:
getState() → {mw.Upload.State}
#
getStateDetails() → {string}
#
Gets details of the current state.
Returns:
- Type
- string
- Inherited from:
- Source:
getText() → {string}
#
Get the text of the file page, to be created on file upload.
Returns:
- Type
- string
- Inherited from:
- Source:
getWatchlist() → {boolean}
#
Get the boolean for whether the file will be watchlisted after upload.
Returns:
- Type
- boolean
- Inherited from:
- Source:
setComment(comment)
#
Set the edit comment for the upload.
Parameters:
| Name | Type | Description |
|---|---|---|
comment |
string |
- Inherited from:
- Source:
setFile(file)
#
Set the file to be uploaded.
Parameters:
| Name | Type | Description |
|---|---|---|
file |
HTMLInputElement | File | Blob |
- Inherited from:
- Source:
setFilekey(filekey)
#
Set the stashed file to finish uploading.
Parameters:
| Name | Type | Description |
|---|---|---|
filekey |
string |
- Inherited from:
- Source:
setFilename(filename)
#
Set the filename, to be finalized on upload.
Parameters:
| Name | Type | Description |
|---|---|---|
filename |
string |
- Inherited from:
- Source:
setFilenameFromFile()
#
Sets the filename based on the filename as it was on the upload.
- Inherited from:
- 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 |
- Inherited from:
- Source:
setText(text)
#
Set the text of the file page, to be created on file upload.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string |
- Inherited from:
- Source:
setWatchlist(watchlist)
#
Set whether the file should be watchlisted after upload.
Parameters:
| Name | Type | Description |
|---|---|---|
watchlist |
boolean |
- Inherited from:
- Source:
upload() → {jQuery.Promise}
#
uploadToStash() → {jQuery.Promise}
#
Upload the file to the stash to be completed later.
Returns:
- Type
- jQuery.Promise
- Inherited from:
- Source: