Working on filesaver, while running SONAR QUBE it shows " 'fileSaver' is deprecated. use { autoBom: false } as the third argument "
this.http.get(`getTemplate/${doc.id}`, { responseType: 'blob' }).subscribe(
(data: any) => {
fileSaver.saveAs(new Blob([data], { type: this.fileType }), doc.docName)
error :- 'fileSaver' is deprecated. use { autoBom: false } as the third argument
Even if I use autobom:false it still shows the same
Here is the code for autobom
this.http.get(`getDocument/${doc.docId}`, { responseType: 'blob' }).subscribe(
(data: any) => {
var blob = new Blob([data], { type: this.fileType });
fileSaver.saveAs(blob, doc.docName,false);
'saveAs' is deprecated. use { autoBom: false } as the third argumentWhy is this an issue?
'fileSaver' is deprecated. use { autoBom: false } as the third argument Why is this an issue?
It should be the setting of
autoBom, not justfalse:See comment from @leokom.