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

12 lines
371 B
JavaScript

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