show images with unknown height - fixes issue 475 hopefully

pull/499/head
Matthew Hodgson 2015-12-09 13:24:15 +00:00
parent 4b8d7a612a
commit 8ecf70dda0
1 changed files with 6 additions and 1 deletions

View File

@ -105,6 +105,11 @@ module.exports = React.createClass({
res = ", " + style.width + "x" + style.height + "px";
}
var size;
if (this.props.mxEvent.getContent().info && this.props.mxEvent.getContent().info.size) {
size = filesize(this.props.mxEvent.getContent().info.size);
}
return (
<div className="mx_ImageView">
<div className="mx_ImageView_lhs">
@ -124,7 +129,7 @@ module.exports = React.createClass({
<a className="mx_ImageView_link" href={ this.props.src } target="_blank">
<div className="mx_ImageView_download">
Download this file<br/>
<span className="mx_ImageView_size">({ filesize(this.props.mxEvent.getContent().info.size) }{ res })</span>
<span className="mx_ImageView_size">{ size } { res }</span>
</div>
</a>
<div className="mx_ImageView_button">