diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-07-29 20:55:56 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-07-29 20:55:56 +0500 |
commit | 1c186121fe04fb61d945f0b57112e28675c8e066 (patch) | |
tree | f2cf511b15990bd01bfde349016388af39f8d340 /web/react/components/view_image.jsx | |
parent | 5d77ff4bcde3496554551701438c1f42550e58b3 (diff) | |
parent | 27dbcd8767426a60699d2acbeeb9b8a825d5b728 (diff) | |
download | chat-1c186121fe04fb61d945f0b57112e28675c8e066.tar.gz chat-1c186121fe04fb61d945f0b57112e28675c8e066.tar.bz2 chat-1c186121fe04fb61d945f0b57112e28675c8e066.zip |
Merge branch 'master' of https://github.com/mattermost/platform
Diffstat (limited to 'web/react/components/view_image.jsx')
-rw-r--r-- | web/react/components/view_image.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx index c107de4d7..7b096c629 100644 --- a/web/react/components/view_image.jsx +++ b/web/react/components/view_image.jsx @@ -40,7 +40,7 @@ module.exports = React.createClass({ if (fileInfo.path.indexOf("/api/v1/files/get") !== -1) { fileInfo.path = fileInfo.path.split("/api/v1/files/get")[1]; } - fileInfo.path = window.location.origin + "/api/v1/files/get" + fileInfo.path; + fileInfo.path = utils.getWindowLocationOrigin() + "/api/v1/files/get" + fileInfo.path; src = fileInfo['path'] + '_preview.jpg'; } @@ -148,7 +148,7 @@ module.exports = React.createClass({ if (info.path.indexOf("/api/v1/files/get") !== -1) { info.path = info.path.split("/api/v1/files/get")[1]; } - info.path = window.location.origin + "/api/v1/files/get" + info.path; + info.path = utils.getWindowLocationOrigin() + "/api/v1/files/get" + info.path; preview_filename = info['path'] + '_preview.jpg'; } @@ -166,7 +166,7 @@ module.exports = React.createClass({ if (download_link.indexOf("/api/v1/files/get") !== -1) { download_link = download_link.split("/api/v1/files/get")[1]; } - download_link = window.location.origin + "/api/v1/files/get" + download_link; + download_link = utils.getWindowLocationOrigin() + "/api/v1/files/get" + download_link; return ( <div className="modal fade image_modal" ref="modal" id={this.props.modalId} tabIndex="-1" role="dialog" aria-hidden="true"> |