Skip to content

Instantly share code, notes, and snippets.

@melkio
Created November 3, 2012 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melkio/4006397 to your computer and use it in GitHub Desktop.
Save melkio/4006397 to your computer and use it in GitHub Desktop.
Upload a nested file to azure blob storage
// ...setup container
var folder = container.GetDirectoryReference("directory");
var sub = folder.GetBlockBlobReference("nested_file");
using (var stream = new MemoryStream(File.ReadAllBytes("path_del_file")))
{
stream.Seek(0, SeekOrigin.Begin);
sub.UploadFromStream(stream);
stream.Close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment