Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I need to receive pdf file sent from Angular through web api. As i searched, i am getting web result from google to send pdf from web api and not vice-versa. Please help me to and I am very new to WEB Api.

Thanks in Advance.

Regards,
Priya

What I have tried:

As did google search, i got to send pdf from web api and not receiving file from web api.
Posted
Updated 9-Sep-19 1:35am

1 solution

You are probably best off into breaking this down into components:

1. "receive pdf file sent from Angular" looks to me like you want to create a POST request from Angular. So search for that and you will find articles similar to this
AngularJS Http Post Method ($http.post) with Parameters Example - Tutlane[^]

2. ... through web API looks like you want this POST request to be processed in Web API as a file upload. Then search for just that and you will find something like
Uploading a File in ASP.Net Web API[^]

Now the way I would do this would be to create the Web API file upload component first and use a simple web page with file upload on it to test it out and make sure it is working; and then work on the Angular component to replicate that html form
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900