The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Upload Any File Using HTTP Post Multipart Form Data
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

cpn cpnPosted Aug 7, 2023, 1:06 PM
Is it copied from here https://briangrinstead.com/blog/multipart-form-post-in-c/
Giacomo Stelluti ScalaPosted Apr 6, 2023, 9:06 AM
Really helpful! Using canonical way is impossible to get Content-Disposition correctly formatted
VijayPosted Aug 16, 2022, 1:42 AM
Hi Ruchi - I treid this solution but seem it is not working, may be it is few many parameters I have to pass (one of that is object), let me know if you can assist ?
Sasi RPosted Nov 29, 2021, 5:14 PM
Working fine. After a long search, I got it thanks.
Turtle GooPosted Apr 8, 2021, 2:31 AM
Not working for me, I'm able to send through postman but not your code, keep getting "The remote server returned an error: (415) Unsupported Media Type" Error.
Siddharth BoraniaPosted Dec 28, 2020, 10:55 AM
I noticed just a function name 'MultipartFormDataPost' is different at one place, otherwise very good and working example.
Nabil NjzPosted Feb 5, 2020, 9:32 AM
I have tested your solution but it's not work with me.I have a website with the first page of authentification with user and password and captcha, then the second page where we create a group of clients and in the end I go to the form with client's informations and two images to upload and captcha to validate the submit. can you help me to discover where is the problem .
Syam MaddiPosted Jan 24, 2020, 9:20 PM
Hi Ruchi, Could you please help me on my request in https://stackoverflow.com/questions/59888921/c-sharp-sending-body-header-data-in-http-post-rest-client
Pallavi BPosted Nov 18, 2019, 1:52 AM
Hey Ruchi, this is perfect and worked as it is....Thanks for this :)
Hiếu Giềng QuyPosted Oct 15, 2019, 11:11 PM
It was very good but I don't know what the header for sending a file? What's the normal header to send a file to a server? Could you show me know about it!!!
Hari HaranPosted Oct 9, 2018, 7:20 AM
Can we set post body parameters as well as file ocntent in this request ??If so , can you share the code ?
Viknaraj ManogararajahPosted Aug 6, 2018, 6:58 PM
nice article thank you for sharing