I know how to save Streams, but I want to take that stream and create thumbnails and other sized images, but I don't know how to save a byte[] to the Azure Blob Storage.
This is what I'm doing now to save the Stream:
// Retrieve reference to a blob named "myblob".
CloudBlockBlob _blockBlob = container.GetBlockBlobReference("SampleImage.jpg");
// upload from Stream object during file upload
blockBlob.UploadFromStream(stream);
// But what about pushing a byte[] array? I want to thumbnail and do some image manipulation
This used to be in the Storage Client library (version 1.7 for sure) - but they removed it in version 2.0
http://blogs.msdn.com/b/windowsazurestorage/archive/2012/10/29/windows-azure-storage-client-library-2-0-breaking-changes-amp-migration-guide.aspx
Creating a read-only memory stream around the byte array is pretty lightweight though:
Update: UploadFromByteArray is back
MSDN documentation - from what I can tell in the source code, this came back for version 3.0 and is still there for version 4.0.
This is the function I currently use:
update:
UploadFromByteArray is back.
http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storage.blob.cloudblockblob.uploadfrombytearray.aspx
I also know nothing about Azure, but using Streams, you could approach it as follows: