Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Apierror-badupload.

MediaWiki:Apierror-badupload

From MoodleDocs

File upload parameter $1 is not a file upload; be sure to use multipart/form-data for your POST and include a filename in the Content-Disposition header.