summaryrefslogtreecommitdiffstats
path: root/web/react/components/view_image.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/view_image.jsx')
-rw-r--r--web/react/components/view_image.jsx18
1 files changed, 12 insertions, 6 deletions
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx
index 6077c4ebc..24efce0f1 100644
--- a/web/react/components/view_image.jsx
+++ b/web/react/components/view_image.jsx
@@ -224,18 +224,24 @@ module.exports = React.createClass({
</div>
</div>
);
+ bgClass = 'white-bg';
// asynchronously request the actual size of this file
if (!(filename in this.state.fileSizes)) {
var self = this;
- utils.getFileSize(utils.getFileUrl(filename), function fileSizeOp(fileSize) {
- if (self.canSetState) {
- var fileSizes = self.state.fileSizes;
- fileSizes[filename] = fileSize;
- self.setState(fileSizes);
+ Client.getFileInfo(
+ filename,
+ function(data) {
+ if (self.canSetState) {
+ var fileSizes = self.state.fileSizes;
+ fileSizes[filename] = parseInt(data["size"], 10);
+ self.setState(fileSizes);
+ }
+ },
+ function(err) {
}
- });
+ );
}
}
} else {