upload-file
Upload a local file to a MediaWiki File namespace. Specify filepath, title, and page text; fails if the target title already exists.
Instructions
Uploads a file from the local disk into the wiki's File namespace and returns the resulting file title and URL. The upload appears in the wiki's upload log. The operator restricts which directories are readable; filepath must be an absolute path inside a configured upload directory, or the call fails before contacting the wiki. Fails if a file with the target title already exists (the wiki does not silently overwrite existing files). To upload directly from a remote web address instead of a local path, use upload-file-from-url. To replace an existing file with a new revision, use update-file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | Yes | File path on the local disk | |
| title | Yes | File title (with or without the "File:" prefix) | |
| text | Yes | Wikitext on the file page | |
| comment | No | Reason for uploading the file |