This solution includes two projects, ClientSideApp
and ServerSideApp
.
-
The
ServerSideApp
project contains an API controllerFilesController
, which includes two actions for (1) uploading a file with Multipart form-data, and (2) downloading a file. TheServerSideApp
project also contains a web page for uploading a file. -
The
ClientSideApp
project is a Console application that uploads a*.txt
file to the API endpoint in theServerSideApp
, then download the file from theServerSideApp
. TheClientSideApp
project demonstrates an example of sending multipart form-data using HttpClient.
The following gif image shows the screen recording of the working demo.
Feel free to use the code in this repository as it is under MIT license.