angular 11 怎么获取 Content-Disposition
2021年4月13日 22:42
编程技术
需求
在 angular 实现文件下载功能, 默认只能在前端代码中手动添加文件类型及文件名。
export class DownloadService {
constructor(private http: HttpClient) { }
/**
* Blob请求
*/
public requestBlob(url: string, data?: any): Observable<any> {
return this.http.request('post', url, {
body: data,...剩余内容已隐藏
查看完整文章以阅读更多