Click here to Skip to main content
14,298,693 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100