import { useSession } from 'src/composables/useSession';
import { getUrl } from './getUrl';

const {getTokenMultimedia} = useSession();
const token =  getTokenMultimedia();

export async function downloadFile(dmsId) {
    let appUrl = await getUrl('', 'lilium');
    appUrl = appUrl.replace('/#/', '');
    window.open(`${appUrl}/api/dms/${dmsId}/downloadFile?access_token=${token}`);
}
