$this->dieStatusWithCode( $status, 'stashfailed' );
}
+ // We can only get warnings like 'duplicate' after concatenating the chunks
+ $warnings = $this->getApiWarnings();
+ if ( $warnings ) {
+ $result['warnings'] = $warnings;
+ }
+
// The fully concatenated file has a new filekey. So remove
// the old filekey and fetch the new one.
UploadBase::setSessionStatus( $this->getUser(), $filekey, false );
if ( isset( $progress['status']->value['verification'] ) ) {
$this->checkVerification( $progress['status']->value['verification'] );
}
+ if ( isset( $progress['status']->value['warnings'] ) ) {
+ $warnings = $this->transformWarnings( $progress['status']->value['warnings'] );
+ if ( $warnings ) {
+ $progress['warnings'] = $warnings;
+ }
+ }
unset( $progress['status'] ); // remove Status object
$this->getResult()->addValue( null, $this->getModuleName(), $progress );
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->getStashFile()->getFileKey();
'stage' => 'assembling',
'filekey' => $newFileKey,
'imageinfo' => $imageInfo,
- 'status' => Status::newGood()
+ 'status' => $status
]
);
} catch ( Exception $e ) {