Reputation: 7042
I have a zipped 2GB file that I need to upload to Windows Azure through my home cable connection, how long should I expect that this file gets uploaded? Has anyone averaged their upload time for their files?
Also when I do this to create a blob for uploading a file
CloudBlob _blob = _container.GetBlobReference("file1");
is this creating CloudBlockBlob
or CloudPageBlob
by default? I have been using the above code to upload files and it has been quite slow.
Upvotes: 1
Views: 798
Reputation: 2852
CloudBlob _blob = _container.GetBlobReference("file1");
It does not create CloudBlockBlob or CloudPageBlob by default.
If you want to use CloudBlockBlob (Azure SDK v2.0):
// Retrieve reference to a blob named "myblob".
CloudBlockBlob blob = container.GetBlockBlobReference("myblob");
now split your file to a small pieces (4MB max), and upload each piece like this:
blob.PutBlock(blockId, memoryStream, null);
where: blockId is a base64-encoded block ID that identifies the block.
and memoryStream A stream that provides the data for the block.
Upvotes: 2