Tech Tangents:Sandbox

From Tech Tangents
Revision as of 20:27, 6 September 2024 by Akbkuku (talk | contribs) (Replaced content with "<html> <script> var param = { filename: 'File_1.jpg', format: 'json', ignorewarnings: 1 }, fileInput = $( '<input/>' ).attr( 'type', 'file' ), submitBtn = $( '<input/>' ).attr( 'type', 'button' ).attr( 'value', 'Upload' ), api = new mw.Api(); $( '#bodyContent' ).append( [ fileInput, submitBtn ] ); $( submitBtn ).on( 'click', function () { api.upload( fileInput[ 0 ], param ).done( function ( data ) { console.log( data.upload.filename + ' has sucessfull...")
Jump to navigation Jump to search