// upload file / media
(async () => {
const wiki = new Wikiapi;
await wiki.login('user', 'password', 'test');
let result = await wiki.upload({ file_path: '/local/file/path', comment: '', text: '' });
})();
Nice. It does the job. But what is the recommended approach to complete the Commons.wikimedia.org Upload Wizard's form with author, source, license, categories and co ? Should I program a second section of code which edit the page after upload. Or should I use text:"value" with "value" being my whole page's wikicode ?
Note: you can answer me here, I will PR the Readme with a clarification. 😉
Hello, I see on the readme the following :
Nice. It does the job. But what is the recommended approach to complete the Commons.wikimedia.org Upload Wizard's form with author, source, license, categories and co ? Should I program a second section of code which edit the page after upload. Or should I use
text:"value"
with "value" being my whole page's wikicode ?Note: you can answer me here, I will PR the Readme with a clarification. 😉
Please also note you don't have test for uploads.