diff --git a/src/skins/vector/views/molecules/MFileTile.js b/src/skins/vector/views/molecules/MFileTile.js
index f7e8991f93..9180bd6b83 100644
--- a/src/skins/vector/views/molecules/MFileTile.js
+++ b/src/skins/vector/views/molecules/MFileTile.js
@@ -30,15 +30,25 @@ module.exports = React.createClass({
var content = this.props.mxEvent.getContent();
var cli = MatrixClientPeg.get();
- return (
-
-
+ var httpUrl = cli.mxcUrlToHttp(content.url);
+ var text = this.presentableTextForFile(content);
+
+ if (httpUrl) {
+ return (
+
+
+
+ );
+ } else {
+ var extra = text ? ': '+text : '';
+ return
+ Invalid file{extra}
- );
+ }
},
});
diff --git a/src/skins/vector/views/molecules/MImageTile.js b/src/skins/vector/views/molecules/MImageTile.js
index 0667dabd10..2f3b7a55db 100644
--- a/src/skins/vector/views/molecules/MImageTile.js
+++ b/src/skins/vector/views/molecules/MImageTile.js
@@ -73,18 +73,33 @@ module.exports = React.createClass({
var imgStyle = {};
if (thumbHeight) imgStyle['height'] = thumbHeight;
- return (
-
-
-
-
-
-
- );
+
+
+ );
+ } else if (content.body) {
+ return (
+
+ Image '{content.body}' cannot be displayed.
+
+ );
+ } else {
+ return (
+
+ This image cannot be displayed.
+
+ );
+ }
},
});