Tech Tangents:Sandbox: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
const api = new mw.Api(); | const api = new mw.Api(); | ||
let param = { | let param = { | ||
filename: | filename: fileInput.name, | ||
format: "json", | format: "json", | ||
ignorewarnings: 1, | ignorewarnings: 1, | ||
Line 17: | Line 17: | ||
api | api | ||
.upload(fileInput | .upload(fileInput, param) | ||
.done(function (data) { | .done(function (data) { | ||
console.log(data.upload.filename + " has sucessfully uploaded."); | console.log(data.upload.filename + " has sucessfully uploaded."); |
Revision as of 21:04, 6 September 2024