更新时间:2023-11-15 18:54:22
使用 BinaryReader 对象从流中返回一个字节数组,如:
Use a BinaryReader object to return a byte array from the stream like:
byte[] fileData = null;
using (var binaryReader = new BinaryReader(Request.Files[0].InputStream))
{
fileData = binaryReader.ReadBytes(Request.Files[0].ContentLength);
}