deleted notifs components
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {HttpResponse} from "@angular/common/http";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class FileService {
|
||||
getFilenameFromHttpResponse(httpResponse: HttpResponse<Blob>) {
|
||||
const contentDispositionHeader = httpResponse.headers.get('Content-Disposition');
|
||||
// console.log(contentDispositionHeader);
|
||||
let result = contentDispositionHeader.split(';')[1].trim().split('=')[1];
|
||||
// Removing the " from the after trim operation
|
||||
result = result.replace(/"/g, '');
|
||||
// Removing . from filename
|
||||
// return result.replace(/./g, '_');
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user