public void Uploader(string filename, Stream Data)
{
BinaryReader reader = new BinaryReader(Data);
string path = @"C:/Friendisc/Images";
FileStream fstream = new FileStream(path, FileMode.CreateNew);
BinaryWriter wr = new BinaryWriter(fstream);
wr.Write(reader.ReadBytes((int)Data.Length));
wr.Close();
fstream.Close();
Data.Close();
}
我收到错误消息:拒绝访问路径。我需要做什么?
另外,我如何将图像上传到同一解决方案中的另一个项目?