【发布时间】:2019-10-29 20:39:13
【问题描述】:
我创建了一个 Premium Azure Blob Storage 帐户,创建了一个 Shared Access Signature 并尝试从在 http://localhost:5001 下运行的 asp.net core Web 应用程序 html 页面上传图像。
我在门户中没有看到 CORS 部分。所以,我在 Firewalls and virtual networks 下设置了 All Networks,我认为应该允许http://localhost:5001。
当我尝试向 Blob 帐户发帖时出现以下错误:
Access to XMLHttpRequest at 'https://mypictures.blob.core.windows.net/<Token>' from origin 'https://localhost:5001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
【问题讨论】:
-
answer 表示在门户的 BLOB SERVICE 下有一个 CORS 部分。但我在我的门户帐户中没有看到。
-
快速提问:如果要上传图片,为什么要创建“高级存储帐户”?
标签: azure cors azure-blob-storage