MediaWiki API ヘルプ
ãã®ãã¼ã¸ã¯èªåçæããã MediaWiki API ã®èª¬æææ¸ãã¼ã¸ã§ãã
èª¬æææ¸ã¨ä¾: https://www.mediawiki.org/wiki/API
action=upload
- ãã®ã¢ã¸ã¥ã¼ã«ã¯èªã¿åãã®æ¨©éãå¿ è¦ã¨ãã¾ãã
- ãã®ã¢ã¸ã¥ã¼ã«ã¯æ¸ãè¾¼ã¿ã®æ¨©éãå¿ è¦ã¨ãã¾ãã
- ãã®ã¢ã¸ã¥ã¼ã«ã¯ POST ãªã¯ã¨ã¹ãã®ã¿ãåãä»ãã¾ãã
- Source: MediaWiki
- License: GPL-2.0-or-later
Upload a file, or get the status of pending uploads.
Several methods are available:
- Upload file contents directly, using the file parameter.
- Upload the file in pieces, using the filesize, chunk, and offset parameters.
- Have the MediaWiki server fetch a file from a URL, using the url parameter.
- Complete an earlier upload that failed due to warnings, using the filekey parameter.
Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when sending the file.
- filename
Target filename.
- comment
Upload comment. Also used as the initial page text for new files if text is not specified.
- æ¢å®å¤: (空)
- tags
Change tags to apply to the upload log entry and file page revision.
- å¤ (|ãããã¯å¥ã®æååã§åºåã):
- text
Initial page text for new files.
- watch
- 廿¢äºå®ã§ãã
ãã®ãã¼ã¸ãã¦ã©ããããã
- Type: boolean (details)
- watchlist
Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.
- å¤ (次ã®å¤ã®ãããã1ã¤): watchãpreferencesãnochange
- æ¢å®å¤: preferences
- ignorewarnings
ããããè¦åãç¡è¦ããã
- Type: boolean (details)
- file
File contents.
- multipart/form-data å½¢å¼ã§ãã¡ã¤ã«ãã¢ãããã¼ããã¦ãã ããã
- url
ãã¡ã¤ã«åå¾å ã®URL.
- filekey
Key that identifies a previous upload that was stashed temporarily.
- sessionkey
- 廿¢äºå®ã§ãã
Same as filekey, maintained for backward compatibility.
- stash
If set, the server will stash the file temporarily instead of adding it to the repository.
- Type: boolean (details)
- filesize
Filesize of entire upload.
- å¤ã¯ 0 ä»¥ä¸ 104,857,600 以ä¸ã«ãã¦ãã ããã
- Type: integer
- offset
Offset of chunk in bytes.
- å¤ã¯ 0 以ä¸ã«ãã¦ãã ããã
- Type: integer
- chunk
Chunk contents.
- multipart/form-data å½¢å¼ã§ãã¡ã¤ã«ãã¢ãããã¼ããã¦ãã ããã
- async
Make potentially large file operations asynchronous when possible.
- Type: boolean (details)
- checkstatus
Only fetch the upload status for the given file key.
- Type: boolean (details)
- token
action=query&meta=tokens ããåå¾ãããcsrfããã¼ã¯ã³
- ãã®ãã©ã¡ã¼ã¿ã¼ã¯å¿ é ã§ãã
- Upload from a URL.
- api.php?action=upload&filename=Wiki.png&url=http%3A//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png&token=123ABC [ãµã³ãããã¯ã¹ã§éã]
- Complete an upload that failed due to warnings.
- api.php?action=upload&filename=Wiki.png&filekey=filekey&ignorewarnings=1&token=123ABC [ãµã³ãããã¯ã¹ã§éã]