Encountering an issue in Safari on Windows 7 within this specific section
'[object BlobConstructor]' is not a constructor (evaluating 'new Blob([data], {type: 'application/pdf'})')
After trying the solution mentioned in Blob constructor not working in safari / opera?
'[object BlobConstructor]' is not a constructor (evaluating 'new Blob([data.buffer], {type: 'application/pdf'})')
Utilizing the following Blob
code snippet
var file = new Blob([data], {type: 'application/pdf'});
The complete code block is as follows:
$scope.pdffile = "";
$http.get('/api/myurl/'+report_id, {responseType: 'arraybuffer'})
.success(function (data) {
var file = new Blob([data], {type: 'application/pdf'});
var fileURL = URL.createObjectURL(file);
$scope.pdfcontent = $sce.trustAsResourceUrl(fileURL);
$scope.pdffile = "download.pdf";
$scope.loading = false;
});