download link with filename from api

This commit is contained in:
2021-10-08 11:10:15 +01:00
parent ab62e339aa
commit e19efb8b62
7 changed files with 76 additions and 55 deletions
-15
View File
@@ -663,18 +663,3 @@ export const getPortalModuelDetails = (token, appealType, caseReference) => {
console.log("thiserror", error);
});
};
export const getFileFromCRM = (docRef) => {
const weburl = "/api/proxy/documents/download/" + docRef;
console.log("proxy url", weburl);
return axios
.get(weburl, { responseType: "arraybuffer" })
.then((res) => {
console.log(res);
return res;
})
.catch((error) => {
console.log("thi serror", error);
});
};