Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does mediawiki upload files to server

Tags:

php

mediawiki

I just found out that mediawiki does not use move_uploaded_fileDocs. So how does mediawiki upload file to the database?

like image 240
Karthick Avatar asked Jan 28 '26 06:01

Karthick


1 Answers

There is an incredibly complex system of filesystem classes in the includes/upload and includes/filerepo folders. The relevant line, so far as I can tell, is line 216 of includes/filerepo/FSRepo.php:

if ( !rename( $srcPath, $dstPath ) ) {

If you really want to work out how the system works, I suggest you start with includes/upload/UploadFromFile.php and work your way through the network of objects. If you want your sanity, I suggest you don't.

like image 103
lonesomeday Avatar answered Jan 29 '26 18:01

lonesomeday



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!