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#

Notifications You must be signed in to change notification settings

erossini/HttpClientMultipart

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

Upload/Download Files Using HttpClient in C#

In this new post, I show you how to upload/download files using HttpClient in C# and .NET Core. Creating a new version of the Markdown Editor component for Blazor, I face some issues with the file upload. So, I was working to find a solution and now I can tell you how to do it. First, I will take a look at how to send multipart MIME data to a Web API using HttpClient. We will create two applications to demonstrate the data transfer between the client side and the server side. The server-side app is an ASP.NET Core web project, which includes a Web API controller for uploading and downloading files. The client-side app is a Console project , which contains a Typed HttpClient to send HTTP requests for file uploading and/or downloading. The full explanetion of the code is in this post on PureSourceCode.