Fix call to non-existing TempFSFileFactory::getTempFSFile()
[lhc/web/wiklou.git] / includes / upload / UploadFromChunks.php
index cc527e7..c28890b 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use MediaWiki\MediaWikiServices;
+
 /**
  * Backend for uploading files from chunks.
  *
@@ -157,7 +160,8 @@ class UploadFromChunks extends UploadFromFile {
                // Get the file extension from the last chunk
                $ext = FileBackend::extensionFromPath( $this->mVirtualTempPath );
                // Get a 0-byte temp file to perform the concatenation at
-               $tmpFile = TempFSFile::factory( 'chunkedupload_', $ext, wfTempDir() );
+               $tmpFile = MediaWikiServices::getInstance()->getTempFSFileFactory()
+                       ->newTempFSFile( 'chunkedupload_', $ext );
                $tmpPath = false; // fail in concatenate()
                if ( $tmpFile ) {
                        // keep alive with $this