Этот коммит содержится в:
Asaad Mahmood
2015-10-23 10:53:57 +05:00
родитель 79ce0dd914 02a6f6b2cd
Коммит cc904a7ec7
100 изменённых файлов: 1179 добавлений и 643 удалений

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

@@ -869,7 +869,7 @@ export function getFileUrl(filename) {
if (url.indexOf('/api/v1/files/get') !== -1) {
url = filename.split('/api/v1/files/get')[1];
}
url = getWindowLocationOrigin() + '/api/v1/files/get' + url;
url = getWindowLocationOrigin() + '/api/v1/files/get' + url + '?' + getSessionIndex();
return url;
}
@@ -880,6 +880,14 @@ export function getFileName(path) {
return split[split.length - 1];
}
export function getSessionIndex() {
if (global.window.mm_session_token_index >= 0) {
return 'session_token_index=' + global.window.mm_session_token_index;
}
return '';
}
// Generates a RFC-4122 version 4 compliant globally unique identifier.
export function generateId() {
// implementation taken from http://stackoverflow.com/a/2117523