Changed getFile api call to always attach headers

Этот коммит содержится в:
Harrison Healey
2016-04-08 18:06:35 -04:00
родитель df77179ecc
Коммит 3803750fb1
5 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@@ -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.