Angularjs 如何在使用angular js从字节[]创建Bolb对象时提及文件名和URL

Angularjs 如何在使用angular js从字节[]创建Bolb对象时提及文件名和URL,angularjs,web-services,Angularjs,Web Services,我正在使用angular访问RESTAPI,它返回字节数组的ResponseEntity,比如返回新的ResponseEntity(pdf,headers,HttpStatus.OK) 我前面的代码如下所示,这是我从 文件名在Rest Api中设置为标头,并返回如下响应: headers.add("Content-Disposition", new StringBuilder("inline; filename=\"").append("report.pdf").append("\"").to

我正在使用angular访问RESTAPI,它返回字节数组的
ResponseEntity
,比如
返回新的ResponseEntity(pdf,headers,HttpStatus.OK)

我前面的代码如下所示,这是我从

文件名在Rest Api中设置为标头,并返回如下响应:

 headers.add("Content-Disposition", new StringBuilder("inline; filename=\"").append("report.pdf").append("\"").toString());
我想将上面的文件名设置为Bolb对象,地址栏中的新窗口URL应该是post请求的URL。 因此,在
$window.open(fileURL)
调用后,地址栏应显示URL为 {{project_id}}和生成的文件的名称应为:report.pdf

目前,URL的名称为
blob:http%3A//localhost%3A8080/88506783-779c-4525-bdc3-329029d23257“
,文件名为88506783-779c-4525-bdc3-329029d23257.pdf 我怎样才能做到以上请大家帮忙

 headers.add("Content-Disposition", new StringBuilder("inline; filename=\"").append("report.pdf").append("\"").toString());