TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shailesh Uke
803
807
17.1k
File Not download in Asp.Net Core 2.0 + Angullar 4
Apr 17 2018 10:17 PM
Calling From Angular 4
...
let header = new Headers({ 'Content-Type': 'application/json' });
this.http.post(this.url + 'GeneratePdf', this.responseModel, { headers: header })
.subscribe(values => {
console.log(values);
});
Asp.Net Core 2.0 API
[HttpPost]
public IActionResult GeneratePdf([FromBody]ResponseModel objResponse)
{
....
byte[] bytes = memoryStream.ToArray();
memoryStream.Close();
var result = new FileContentResult(bytes, "application/pdf")
{
FileDownloadName = $"HashFiles.pdf"
};
return result;
}
File not download when i call the API from Angular but in postman working fine.
Reply
Answers (
0
)
Remove time in itextsharp pdf document
Select Multiple checkbox in gridview using dev express