0
0
Fork 0
salix-front-mindshore-fork2/src/composables/downloadFile.js

13 lines
477 B
JavaScript

import { useSession } from 'src/composables/useSession';
import { getUrl } from './getUrl';
const { getTokenMultimedia } = useSession();
const token = getTokenMultimedia();
export async function downloadFile(dmsId, isDocuware = false) {
let appUrl = await getUrl('', 'lilium');
appUrl = appUrl.replace('/#/', '');
const urlPath = isDocuware ? '/docuwareDownload' : '/downloadFile';
window.open(`${appUrl}/api/dms/${dmsId}${urlPath}?access_token=${token}`);
}