Greetings, I'm trying to upload a file via the API and wget, based on this from http://www.mediawiki.org/wiki/API:Edit_-_Uploading_files :
api.php ? action=upload & filename=Test.txt & file=file_contents_here & token=+\ Login and fetching token is OK, but on upload... wget --load-cookies cookies.txt -O upload.xml \ --post-data "action=upload&filename=atlasmw-export.xml&file=[content goes here]&token=$EDITTOKEN" \ $API I get this: <error code="unknown_action" info="Unrecognized value for parameter 'action': upload" xml:space="preserve"> What's wrong? Is this MediaWiki's way of saying it's not happy with with the lack of multipart/form-data...? I'm using MediaWiki 1.15.1. And yes, I'm aware that wget probably isn't the best choice for this. Pointers to working code in any language (PHP etc) are welcome. Cheers, -jani _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
