[HttpGet("GetDownload/{id}")]
public FileResult Download([FromRoute] int id)
{
var getFile = _context.UploadPoliceReports.FirstOrDefault(m => m.UploadPoliceReportID == id);
MemoryStream ms = new MemoryStream(getFile.Data);
return File(ms, getFile.ContentType, getFile.FileName);
}
getDownloadPolice(id: number) {
//return this.http.get(this.downloadPoliceUrl + '/' + id, { responseType: ResponseContentType.Blob })
return this.http.get(this.downloadPoliceUrl + '/' + id)
.map((data: Response) => {
<<<??????>>>
//return data;
//return new Blob([data.blob()], { type: data.blob().type });
})
.do(data => console.log(data));
}
getDownload() {
this.userFormVehicleService.getDownloadPolice(43).subscribe(data => {
<<<??????>>>
});
}