byte[] filebyte = mimeEntity.Data;
FileStream fs = new FileStream(MapPath("Attachments/" + fileName), FileMode.CreateNew);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(filebyte, 0, filebyte.Length);
bw.Close();
fs.Close();
将byte[]类型的数据,转化为文件存在硬盘中
最新推荐文章于 2024-08-18 03:50:32 发布