Manual:Uploading

Uploading is done by Special:Upload or API:Upload. There are two types of uploads with separate user rights and log actions. The "upload" event uploads a new file; the "overwrite" event ("reupload" user right) uploads a new version of an existing file.

Database
The and  data are stored in  as a PHP-serialized array.