4
Answers

WEB API - File upload with json data

Keyur Mehta

Keyur Mehta

5y
9.2k
1
Hello to all,
 
I am trying to make a web API in c# for sending an email. My API is ready to send an email with the body part. Now I am trying to implement attachment. I have to upload attachment files to the server and I studied many documents to upload file on the server. I also got the success to upload files with MultiPart Async. But can anyone suggest me that how can I handle the upload files and also send the JSON data in a single request? Means when I call the API to send the email I have to send the data like, From email address, to address, body part. And also I want to upload the attachment file in the same request. 
 
I appreciate the suggestion.  
 
Thank You. 
Answers (4)