Skip to content

Instantly share code, notes, and snippets.

@lnmunhoz
Created March 24, 2015 19:42
Show Gist options
  • Save lnmunhoz/d002d4fd5f81bf7dacea to your computer and use it in GitHub Desktop.
Save lnmunhoz/d002d4fd5f81bf7dacea to your computer and use it in GitHub Desktop.
Save FileStream into Disk
// file is our stream
var fileStream = File.Create(@"..\"+ file.FileName, (int) file.Length);
var bytesInStream = new byte[file.Length];
file.Read(bytesInStream, 0, bytesInStream.Length);
fileStream.Write(bytesInStream, 0, bytesInStream.Length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment