X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2Fjobs%2FAssembleUploadChunksJob.php;h=e2914be5e4dbad5ce5486f39e222c8856fd3235d;hb=7874fc4bec845ad92960b07e969c65f3c3fe74f2;hp=1e804c457535055f19c935f9162f186126ac9f9d;hpb=ff244610658099d90283a819b167baa824d90e93;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/jobs/AssembleUploadChunksJob.php b/includes/jobqueue/jobs/AssembleUploadChunksJob.php index 1e804c4575..e2914be5e4 100644 --- a/includes/jobqueue/jobs/AssembleUploadChunksJob.php +++ b/includes/jobqueue/jobs/AssembleUploadChunksJob.php @@ -20,6 +20,7 @@ * @file * @ingroup Upload */ +use Wikimedia\ScopedCallback; /** * Assemble the segments of a chunked upload. @@ -73,8 +74,12 @@ class AssembleUploadChunksJob extends Job { return false; } + // We can only get warnings like 'duplicate' after concatenating the chunks + $status = Status::newGood(); + $status->value = [ 'warnings' => $upload->checkWarnings() ]; + // We have a new filekey for the fully concatenated file - $newFileKey = $upload->getLocalFile()->getFileKey(); + $newFileKey = $upload->getStashFile()->getFileKey(); // Remove the old stash file row and first chunk file $upload->stash->removeFileNoAuth( $this->params['filekey'] ); @@ -95,7 +100,7 @@ class AssembleUploadChunksJob extends Job { 'stage' => 'assembling', 'filekey' => $newFileKey, 'imageinfo' => $imageInfo, - 'status' => Status::newGood() + 'status' => $status ] ); } catch ( Exception $e ) {