$extension = $n ? substr( $path, $n + 1 ) : '';
} else {
// If not, assume that it should be related to the MIME type of the original file.
$extension = $n ? substr( $path, $n + 1 ) : '';
} else {
// If not, assume that it should be related to the MIME type of the original file.