From 1c08a33b92f72d77d6c5f1fce916e2cd7c655ff0 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Tue, 21 Jul 2015 16:54:24 -0400
Subject: Fixing file uploads and previews for new /team/ URL structure

---
 web/react/components/post_body.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'web/react/components/post_body.jsx')

diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index 96b441c0e..7871f52b7 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -29,7 +29,7 @@ module.exports = React.createClass({
                 var type = utils.getFileType(fileInfo.ext);
 
                 // This is a temporary patch to fix issue with old files using absolute paths
-                if (fileInfo.path.indexOf("/api/v1/files/get") == -1) {
+                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;
@@ -109,7 +109,7 @@ module.exports = React.createClass({
                 var type = utils.getFileType(fileInfo.ext);
 
                 // This is a temporary patch to fix issue with old files using absolute paths
-                if (fileInfo.path.indexOf("/api/v1/files/get") == -1) {
+                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;
-- 
cgit v1.2.3-1-g7c22

