Reviewed-on: #990 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
8688f2a3aa
|
@ -9,7 +9,7 @@ const token = getTokenMultimedia();
|
|||
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
||||
const appUrl = (await getUrl('', 'lilium')).replace('/#/', '');
|
||||
const response = await axios.get(
|
||||
url ?? `${appUrl}/${model}/${id}${urlPath}?access_token=${token}`,
|
||||
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
|
||||
{ responseType: 'blob' }
|
||||
);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ describe('downloadFile', () => {
|
|||
await downloadFile(1);
|
||||
|
||||
expect(axios.get).toHaveBeenCalledWith(
|
||||
`${baseUrl}/dms/1/downloadFile?access_token=${token}`,
|
||||
`${baseUrl}/api/dms/1/downloadFile?access_token=${token}`,
|
||||
{ responseType: 'blob' }
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue