Hi I'm tired after trying each solution but not able to make it work.
my http call in angular is
$http({
method: 'GET',
url: API_URL + 'v1/file/' + candidateId + '/download',
headers: {
'authToken': AuthService.getToken(),
},
responseType: 'arraybuffer'
})
.then(function onSuccess(response) {
successCallback(response);
},
function onError(response) {
errorCallback(response);
});
and in Success of this code
vm.onSuccessDownloadResume = function(response) {
var blob = new Blob([response.data], {type: response.headers('content-type')});
var objectUrl = URL.createObjectURL(blob);
window.open(objectUrl);
};
I tried webkitURL.createObjectURL(blob), it's working fine for chrome only but URL.createObject is not at all working.
getting message URL.createObjectURL() is not a function()
Thanks