Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   getBlob(fileDto: DataFiles){
  2.     return this.http.get(`${environment.serverUrl}/data-files/download/post/${fileDto.id}`, {responseType: 'blob'});
  3.   }
  4.  
  5.   download(data: any, fileDto: DataFiles) {
  6.     console.log(fileDto);
  7.     const blob = new Blob([data], { type: "image/"+fileDto.fileType });
  8.     const url= window.URL.createObjectURL(blob);
  9.     window.open(url);
  10.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement