MediaWiki API ヘルプ
ãã®ãã¼ã¸ã¯èªåçæããã MediaWiki API ã®èª¬æææ¸ãã¼ã¸ã§ãã
èª¬æææ¸ã¨ä¾: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=upload
- ãã®ã¢ã¸ã¥ã¼ã«ã¯èªã¿åãã®æ¨©éãå¿ è¦ã¨ãã¾ãã
- ãã®ã¢ã¸ã¥ã¼ã«ã¯æ¸ãè¾¼ã¿ã®æ¨©éãå¿ è¦ã¨ãã¾ãã
- ãã®ã¢ã¸ã¥ã¼ã«ã¯ POST ãªã¯ã¨ã¹ãã®ã¿ãåãä»ãã¾ãã
- ã½ã¼ã¹: MediaWiki
- ã©ã¤ã»ã³ã¹: 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
対象ã®ãã¡ã¤ã«åã
- comment
ã¢ãããã¼ãã®ã³ã¡ã³ããæ°è¦ãã¡ã¤ã«ã®ã¢ãããã¼ãã§ text ãæå®ããã¦ããªãå ´åãåæãã¼ã¸ããã¹ãã¨ãã¦ã使ç¨ããã¾ãã
- æ¢å®å¤: (空)
- tags
Change tags to apply to the upload log entry and file page revision.
- å¤ (|ãããã¯å¥ã®æååã§åºåã):
- text
æ°ãããã¡ã¤ã«ã®åæãã¼ã¸ããã¹ãã
- watch
- 廿¢äºå®ã§ãã
ãã®ãã¼ã¸ãã¦ã©ããããã
- å: çå½å¤ (詳細)
- watchlist
Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.
- å¤ (次ã®å¤ã®ãããã1ã¤): nochangeãpreferencesãwatch
- Default: preferences
- ignorewarnings
ããããè¦åãç¡è¦ããã
- å: çå½å¤ (詳細)
- file
File contents.
- Must be posted as a file upload using 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.
- å: çå½å¤ (詳細)
- filesize
Filesize of entire upload.
- å: æ´æ°
- The value must be between 0 and 104,857,600.
- offset
Offset of chunk in bytes.
- å: æ´æ°
- The value must be no less than 0.
- chunk
Chunk contents.
- Must be posted as a file upload using multipart/form-data.
- async
Make potentially large file operations asynchronous when possible.
- å: çå½å¤ (詳細)
- checkstatus
Only fetch the upload status for the given file key.
- å: çå½å¤ (詳細)
- 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 [ãµã³ãããã¯ã¹ã§éã]