FileStream fs = new FileStream(upload.FilePath, FileMode.Open, FileAccess.Read); byte[] ImageData = new byte[fs.Length]; fs.Read(ImageData, 0, System.Convert.ToInt32(fs.Length)); fs.Close();
public void CopyStream(Stream stream, string destPath) { using (var fileStream = new FileStream(destPath, FileMode.Create, FileAccess.Write)) { stream.CopyTo(fileStream); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)