I want users to be able to download blobs from my website. I want the fastest/cheapeast/best way to do this.
Heres what i came up with:
Cloud
Your code is almost right. Try this:
public virtual ActionResult DownloadFile(string name)
{
Response.AddHeader("Content-Disposition", "attachment; filename=" + name); // force download
CloudBlobContainer blobContainer = CloudStorageServices.GetCloudBlobsContainer();
CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobName);
blob.DownloadToStream(Response.OutputStream);
return new EmptyResult();
}
Hope this helps.