* @file
* @ingroup Upload
*/
+use Wikimedia\ScopedCallback;
/**
* Assemble the segments of a chunked upload.
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'] );
'stage' => 'assembling',
'filekey' => $newFileKey,
'imageinfo' => $imageInfo,
- 'status' => Status::newGood()
+ 'status' => $status
]
);
} catch ( Exception $e ) {