summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/file_attachment.jsx4
-rw-r--r--web/react/components/file_preview.jsx7
2 files changed, 1 insertions, 10 deletions
diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx
index 2474b3d8a..c10269680 100644
--- a/web/react/components/file_attachment.jsx
+++ b/web/react/components/file_attachment.jsx
@@ -125,10 +125,6 @@ export default class FileAttachment extends React.Component {
getFileInfoFromName(name) {
var fileInfo = utils.splitFileLocation(name);
- // This is a temporary patch to fix issue with old files using absolute paths
- if (fileInfo.path.indexOf('/api/v1/files/get') !== -1) {
- fileInfo.path = fileInfo.path.split('/api/v1/files/get')[1];
- }
fileInfo.path = utils.getWindowLocationOrigin() + '/api/v1/files/get' + fileInfo.path;
return fileInfo;
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(