if ( !$this->files[$key]->exists() ) {
wfDebug( __METHOD__ . " tried to get file at $key, but it doesn't exist\n" );
+ // @todo Is this not an UploadStashFileNotFoundException case?
throw new UploadStashBadPathException( "path doesn't exist" );
}
}
/**
- * Find or guess extension -- ensuring that our extension matches our mime type.
+ * Find or guess extension -- ensuring that our extension matches our MIME type.
* Since these files are constructed from php tempnames they may not start off
* with an extension.
* XXX this is somewhat redundant with the checks that ApiUpload.php does with incoming
if ( $n !== false ) {
$extension = $n ? substr( $path, $n + 1 ) : '';
} else {
- // If not, assume that it should be related to the mime type of the original file.
+ // If not, assume that it should be related to the MIME type of the original file.
$magic = MimeMagic::singleton();
$mimeType = $magic->guessMimeType( $path );
$extensions = explode( ' ', MimeMagic::singleton()->getExtensionsForType( $mimeType ) );
class UploadStashException extends MWException {
}
-class UploadStashNotAvailableException extends UploadStashException {
-}
-
class UploadStashFileNotFoundException extends UploadStashException {
}