راهنمای واسط برنامهنویسی کاربردی مدیاویکی
این یک صفحهٔ مستندات برای واسط برنامهنویسی کاربردی مدیاویکی است که بهطور خودکار ایجاد شدهاست.
مستندات و نمونهها: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=upload
- این پودمان نیازمند اختیارات خواندن است.
- این پودمان نیازمند اختیارات خواندن است.
- این پودمان تنها درخواستهای POST را میپذیرد.
- منبع: MediaWiki
- مجوز: GPL-2.0-or-later
بارگذاری یک پرونده یا دریافت وضعیت بارگذاریهای در انتظار.
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
- Upload comment. Also used as the initial page text for new files if text is not specified. 
- پیشفرض: (خالی)
- tags
- برچسبهای تغییر برای افزودن به مدخل سیاههٔ بارگذاری و نسخهٔ صفحهٔ پرونده. 
- مقدارهای (جداشده با | یا جایگزینهای آن):
- text
- Initial page text for new files. 
- watch
- منسوخشده.
- Watch the page. 
- نوع: بولی (جزئیات)
- watchlist
- افزودن یا حذف بدون قید و شرط صفحه از فهرست پیگیریهای کاربر کنونی، پیروی از ترجیحات (برای کاربران ربات نادیده گرفته میشود) یا عدم تغییر وضعیت پیگیری. 
- یکی از مقدارهای زیر: nochange، preferences، watch
- پیشفرض: preferences
- ignorewarnings
- چشمپوشی از همهٔ هشدارها. 
- نوع: بولی (جزئیات)
- file
- محتوی پرونده. 
- Must be posted as a file upload using multipart/form-data.
- 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 ۰ and ۱۰۴٬۸۵۷٬۶۰۰.
- offset
- Offset of chunk in bytes. 
- نوع: عدد صحیح
- The value must be no less than ۰.
- 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
- یک بلیط «csrf» واکشیشده از action=query&meta=tokens 
- این پارامتر الزامی است.
- 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 [باز کردن در صفحهٔ تمرین]