AngularJS: IE Access denied PDF display

When I try to display a pdf block in IE, I get the "Access denied" message.

html file

<object ng-show="{{content}}" data="{{content}}" type="application/pdf"></object>

js file

$http.post('/api',{}, { responseType: 'arraybuffer' })
                    .success(function (response) {
                        var file = new Blob([response], { type: 'application/pdf' });
                        var fileUrl = window.URL.createObjectURL(file);
                        $scope.content = $sce.trustAsResourceUrl(fileUrl);
                    });

When using the built-in acrobat pdf viewer application, it cannot view the temporary file.

+4
source share

Source: https://habr.com/ru/post/1598316/


All Articles