forked from verdnatura/salix-front
13 lines
477 B
JavaScript
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}`);
|
|
}
|