I have met an issue regarding the casting type from HttpInputStream to FileStream.
How I did ?
I have a HttpPostedFileBase object and I want to have
HttpPostedFileBase
public byte[] LoadUploadedFile(HttpPostedFileBase uploadedFile) { var buf = new byte[uploadedFile.InputStream.Length]; uploadedFile.InputStream.Read(buf, 0, (int)uploadedFile.InputStream.Length); return buf; }