Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to receive binary data using ASP.NET MVC?

I'm using ASP.NET MVC controllers for providing RESTful web services. That works just fine for simple data types like string and int. Now I need to send some binary data (like images and video) to this web service. My question is - what data types do I have to use as Action parameters and what else should I be aware of? Thanks!

like image 606
cocoapriest Avatar asked Dec 05 '25 14:12

cocoapriest


1 Answers

I think byte[] suits any binary data. Of course, you have to know how to process it, otherwise it's useless.

like image 62
Egor Pavlikhin Avatar answered Dec 08 '25 15:12

Egor Pavlikhin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!