Extends
Methods
Get the current filekey.
Accepts a stashed file and displays the information for purposes of publishing the file at the behest of the user.
Note that this widget will not finish an upload for you. Use mw.Upload
and mw.Upload#setFilekey
, then mw.Upload#finishStashUpload
to accomplish
that.
const widget = new mw.widgets.StashedFileWidget( {
filekey: '12r9e4rugeec.ddtmmp.1.jpg',
} );
widget.getValue(); // '12r9e4rugeec.ddtmmp.1.jpg'
widget.setValue( '12r9epfbnskk.knfiy7.1.jpg' );
widget.getValue(); // '12r9epfbnskk.knfiy7.1.jpg'