如何连接Azure存储读取.TXT从Blob存储文件 [英] How to connect Azure Storage to read .txt files from blob storage

查看:164
本文介绍了如何连接Azure存储读取.TXT从Blob存储文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以让我知道如何读取的Azure Blob存储的文本文件?

Could anyone let me know how to read a text file from Azure Blob Storage?

推荐答案

这是pretty容易:

It's pretty easy:

string text = CloudStorageAccount.Parse("<your connection string>").CreateCloudBlobClient().GetBlobReference("path/to/the/blob.txt").DownloadText();

当然,如果BLOB是在一个公共的容器,你可以做:

Of course, if the blob is in a public container, you can just do:

string text = new WebClient().DownloadString("http://youraccount.blob.core.windows.net/path/to/blob.txt");

这篇关于如何连接Azure存储读取.TXT从Blob存储文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆