gpt4 book ai didi

windows - 如何连接 Azure 存储以从 Blob 存储读取 .txt 文件

转载 作者:可可西里 更新时间:2023-11-01 13:50:35 25 4
gpt4 key购买 nike

谁能让我知道如何从 Azure Blob 存储读取文本文件?

最佳答案

这很简单:

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

当然,如果 blob 位于公共(public)容器中,您可以这样做:

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

关于windows - 如何连接 Azure 存储以从 Blob 存储读取 .txt 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4151626/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com