MediaWiki API ajuda

Esta es una pàgina de documentació autogenerada de l'API de MediaWiki.

Documentació i eixemples: https://www.mediawiki.org/wiki/API

action=upload

(main | upload)
  • Este mòdul requerix permissos de llectura.
  • Este mòdul requerix permissos d'escritura.
  • Este mòdul només accepta solicituts POST.
  • Font: MediaWiki
  • Llicència: GPL-2.0-or-later

Carrega un archiu o obtin l'estat de carregues pendents.

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.

Paràmetros:
filename

Nom de l'archiu de destí.

comment

Upload comment. Also used as the initial page text for new files if text is not specified.

Predeterminat: (buit)
tags

Cambiar etiquetas para aplicar a la entrada del registro de subidas y a la revisión de página de archivo.

Valors (separats per | u atre separador):
text

Text de pàgina inicial per a archius nous.

watch
En desús.

Vigilar la pàgina.

Tipo: boolean (detalls)
watchlist

Añadir o borrar incondicionalmente la página de la lista de seguimiento del usuario actual, utilizar las preferencias o no cambiar el estado de seguimiento.

U dels següents valors: nochange, preferences, watch
Predeterminat: preferences
ignorewarnings

Ignorar les advertències.

Tipo: boolean (detalls)
file

Contingut de l'archiu.

Must be posted as a file upload using multipart/form-data.
url

URL de la que obtindre l'archiu.

filekey

Clave que identifica una carga anterior que se guardó en el almacén provisional.

sessionkey
En desús.

Idéntico a filekey, mantenido por razones de retrocompatibilidad.

stash

If set, the server will stash the file temporarily instead of adding it to the repository.

Tipo: boolean (detalls)
filesize

Tamany d'archiu total de la càrrega.

Tipo: entero
The value must be between 0 and 104 857 600.
offset

Posició del fragment en bytes.

Tipo: entero
The value must be no less than 0.
chunk

Contingut del fragment.

Must be posted as a file upload using multipart/form-data.
async

Realizar de forma asíncrona las operaciones de archivo potencialmente grandes cuando sea posible.

Tipo: boolean (detalls)
checkstatus

Only fetch the upload status for the given file key.

Tipo: boolean (detalls)
token

A "csrf" token retrieved from action=query&meta=tokens

Este paràmetro és obligatori.