8,757
社区成员
发帖
与我相关
我的任务
分享
public void UploadFile(string fileName, byte[] data)
{
// Make sure the filename has no path information.
string file = Path.Combine(filePath, Path.GetFileName(fileName));
using (FileStream fs = new FileStream(file, FileMode.Create))
{
fs.Write(data, 0, (int)data.Length);
}
}