I'm attempting to upload files to my wiki by way of the API. I'm using version 1.16 beta 3 installed on a CentOS VPS. I am using the API on my mac using OS X. Here is my command:
curl -b cookies.txt -F token="359d6add9d7d2d7f61c0e47e872d932b+\\" -F filename="Test.txt" -F "file=whatever" " http://www.domain.com/w/api.php?action=upload" If the token is incorrect, I get the appropriate bad token message. But when it's correct, I get this bizarre response: <span style="color:blue;"><error code="missingparam" info="One of the parameters sessionkey, file, url is required" xml:space="preserve"></span> Moreover, if I use this command: curl -b cookies.txt -F token="359d6add9d7d2d7f61c0e47e872d932b+\\" -F filename="Test.txt" -F file="@filename" " http://www.domain.com/w/api.php?action=upload" I get this even more bizarre response: <span style="color:blue;"><error code="internal_api_error_MWException" info="Exception Caught: Internal error in ApiResult::setIndexedTagName: Bad parameter" xml:space="preserve"></span> Does anyone have any suggestions? Thanks, Douglas _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
