summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-04-08 18:06:35 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-04-08 18:06:35 -0400
commit3803750fb189880eb4c4b6d41fdca1e6f162b116 (patch)
tree9ed808fec09a7949b641a5b8effb99d30530ceb5 /webapp/utils/utils.jsx
parentdf77179eccffbb77f684abde45cac743f5d0b414 (diff)
downloadchat-3803750fb189880eb4c4b6d41fdca1e6f162b116.tar.gz
chat-3803750fb189880eb4c4b6d41fdca1e6f162b116.tar.bz2
chat-3803750fb189880eb4c4b6d41fdca1e6f162b116.zip
Changed getFile api call to always attach headers
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r--webapp/utils/utils.jsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index a70666e2d..ac373d638 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -1110,9 +1110,8 @@ export function fileSizeToString(bytes) {
}
// Converts a filename (like those attached to Post objects) to a url that can be used to retrieve attachments from the server.
-export function getFileUrl(filename, isDownload) {
- const downloadParam = isDownload ? '?download=1' : '';
- return getWindowLocationOrigin() + '/api/v1/files/get' + filename + downloadParam;
+export function getFileUrl(filename) {
+ return getWindowLocationOrigin() + '/api/v1/files/get' + filename;
}
// Gets the name of a file (including extension) from a given url or file path.