将文件上传到服务器中的 Azure blob 存储

Uploading file to Azure blob storage in server

我已经有一个 SasBlobUrl(由 C# 创建)。如何使用 js 和我的 sasUrl 上传文件。我可以从 sasUrl 创建一个 blockBlobClient 吗?

Could i create a blockBlobClient from sasUrl?

是的,你可以。您将使用 BlockBlobClient(string, PipelineLike) 构造函数通过将 SAS URL 作为第一个参数传递来创建 BlockBlobClient 的新实例。

来自同一个link:

A URL string pointing to Azure Storage block blob, such as "https://myaccount.blob.core.windows.net/mycontainer/blockblob". You can append a SAS if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net/mycontainer/blockblob?sasString".