views:

47

answers:

1

I have a form where the user can upload multiple files. I am using MVC 2.0 and in my controller I need to call a webservice that is a common import interface requires the files to passed in as byte[].

.NET exposes Request.Files as a HttpFileCollectionBase and I access the filehandle using HttpPostedFile or HttpPostedFileBase that provides access to the Stream member.

What is the best way for me to read the bytes from the stream?

BinaryReader? StreamReader? BufferedStream?

A: 

I'd go with System.IO.Stream.

KMan