diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-01-06 09:54:05 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-01-06 09:54:05 -0500 |
commit | a6ba1a17fe22a72d7058621cb29e9f60d9de0a08 (patch) | |
tree | 53fec096f1e388538553067e545d01189c8edaf2 /web/react/components/file_preview.jsx | |
parent | 239d147d9757c62cbfb6ae7b2900b0e5ace6f71c (diff) | |
download | chat-a6ba1a17fe22a72d7058621cb29e9f60d9de0a08.tar.gz chat-a6ba1a17fe22a72d7058621cb29e9f60d9de0a08.tar.bz2 chat-a6ba1a17fe22a72d7058621cb29e9f60d9de0a08.zip |
Removed temporary fix for old filenames that used absolute urls pointing to the get file api
Diffstat (limited to 'web/react/components/file_preview.jsx')
-rw-r--r-- | web/react/components/file_preview.jsx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/web/react/components/file_preview.jsx b/web/react/components/file_preview.jsx index d625a811e..265d3f367 100644 --- a/web/react/components/file_preview.jsx +++ b/web/react/components/file_preview.jsx @@ -35,12 +35,7 @@ export default class FilePreview extends React.Component { var ext = filenameSplit[filenameSplit.length - 1]; var type = Utils.getFileType(ext); - // This is a temporary patch to fix issue with old files using absolute paths - - if (filename.indexOf('/api/v1/files/get') !== -1) { - filename = filename.split('/api/v1/files/get')[1]; - } - filename = Utils.getWindowLocationOrigin() + '/api/v1/files/get' + filename + '?' + Utils.getSessionIndex(); + filename = Utils.getFileUrl(filename); if (type === 'image') { previews.push( |