Hello目前我正在通过angularjs将blob加载到iframe中,但是在保存blob时它有一些奇怪的文件名是否有指定它的方法? 这是我的代码:
let id = $routeParams.id;
$http({
url: `http://..../${id}/`,
method: 'GET',
data: {},
headers: {
'Content-Type': 'application/json'
},
responseType: 'arraybuffer'
}).success((data, status, headers, config) => {
var blob = new Blob([data], {type: 'application/pdf'});
var url = window.URL || window.webkitURL;
var objectUrl = url.createObjectURL(blob);
this.blob = $sce.trustAsResourceUrl(objectUrl);
});