0

On a Google Compute Engine Server (Linux instance-1 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux), pywikibot fails to upload large files with the following error:

pywikibot.data.api.APIError: missingparam: One of the parameters "filekey", "file" and "url" is required. [help:See https://chinadigitaltimes.net/space/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.] 1 pages read 0 pages written Script terminated successfully.

I need to upload files up to 2GB. How can I do this with pywikibot?

  • 1
    There is a lot of missing parameters to this question. You will need to make sure that your pywikibot version is compatible with your MediaWiki version, and you need to make sure that the upload limits and memory limits of php are high enough for the server to be able to handle 2GB uploads. – FO-nTTaX Jun 15 '18 at 21:58
  • Please post your code or command line command if you expect more help. – framawiki Feb 24 '19 at 17:19

1 Answers1

1

The missingparam: One of the parameters "filekey", "file" and "url" is required. error means the server didn't receive the file you want to upload. That's caused by a security limit on the server, both on the webserver software (apache or nginx) and PHP. See Configuring file uploads#Set maximum size for file uploads for instructions.

ciencia
  • 456
  • 4
  • 11