Saved searches
Use saved searches to filter your results more quickly
Cancel Create saved search
Sign up Reseting focus
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Upload/Download Files Using HttpClient in C#
License
Notifications You must be signed in to change notification settings
dotnet-labs/FileTransferUsingHttpClient
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go to file
Folders and files
Last commit message
Last commit date
Latest commit
History
View all files
Repository files navigation
HttpClient sending Multipart form-data
Medium Article: Upload/Download Files Using HttpClient in C#
- The ServerSideApp project contains an API controller FilesController , which includes two actions for (1) uploading a file with Multipart form-data, and (2) downloading a file. The ServerSideApp 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 the ServerSideApp , then download the file from the ServerSideApp . The ClientSideApp project demonstrates an example of sending multipart form-data using HttpClient.
The following gif image shows the screen recording of the working demo.
License
Feel free to use the code in this repository as it is under MIT license.