pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <small id='UdYRf'></small><noframes id='UdYRf'>

    <legend id='UdYRf'><style id='UdYRf'><dir id='UdYRf'><q id='UdYRf'></q></dir></style></legend>
      <bdo id='UdYRf'></bdo><ul id='UdYRf'></ul>
        <i id='UdYRf'><tr id='UdYRf'><dt id='UdYRf'><q id='UdYRf'><span id='UdYRf'><b id='UdYRf'><form id='UdYRf'><ins id='UdYRf'></ins><ul id='UdYRf'></ul><sub id='UdYRf'></sub></form><legend id='UdYRf'></legend><bdo id='UdYRf'><pre id='UdYRf'><center id='UdYRf'></center></pre></bdo></b><th id='UdYRf'></th></span></q></dt></tr></i><div class="takfqco" id='UdYRf'><tfoot id='UdYRf'></tfoot><dl id='UdYRf'><fieldset id='UdYRf'></fieldset></dl></div>
        <tfoot id='UdYRf'></tfoot>

        如何在門戶的 Azure BLOB 存儲中設置 CORS?

        How can I set CORS in Azure BLOB Storage in Portal?(如何在門戶的 Azure BLOB 存儲中設置 CORS?)
          <bdo id='azGdV'></bdo><ul id='azGdV'></ul>

          <i id='azGdV'><tr id='azGdV'><dt id='azGdV'><q id='azGdV'><span id='azGdV'><b id='azGdV'><form id='azGdV'><ins id='azGdV'></ins><ul id='azGdV'></ul><sub id='azGdV'></sub></form><legend id='azGdV'></legend><bdo id='azGdV'><pre id='azGdV'><center id='azGdV'></center></pre></bdo></b><th id='azGdV'></th></span></q></dt></tr></i><div class="y8hkudr" id='azGdV'><tfoot id='azGdV'></tfoot><dl id='azGdV'><fieldset id='azGdV'></fieldset></dl></div>
          <tfoot id='azGdV'></tfoot>

                <small id='azGdV'></small><noframes id='azGdV'>

                  <legend id='azGdV'><style id='azGdV'><dir id='azGdV'><q id='azGdV'></q></dir></style></legend>
                    <tbody id='azGdV'></tbody>
                1. 本文介紹了如何在門戶的 Azure BLOB 存儲中設置 CORS?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我們在 Windows Azure 上有一個 blob 存儲.

                  We have a blob storage on Windows Azure.

                  http://mytest.blob.core.windows.net/forms
                  

                  我使用 CloudBerry 將一些文件上傳到存儲.我可以通過瀏覽器成功下載文件.這些文件是簡單的文本文件,但具有不同的文件擴展名.例如,

                  I uploaded a few files to the storage using CloudBerry. And I can download the files by browsers successfully. These files are simple text files, but with different file extensions. For example,

                  http://mytest.blob.core.windows.net/forms/f001.etx
                  

                  我想通過 jquery ($.get) 下載文件,但是由于 CORS 失敗.

                  I want to download the files via jquery ($.get), however, it failed because of CORS.

                  如何在 Portal 的 Azure BLOB 存儲中配置 CORS?

                  How can I configure CORS in Azure BLOB Storage in Portal?

                  而且,我也應該在客戶端為 CORS 做點什么嗎?

                  And, should I do something for CORS in the client side too?

                  推薦答案

                  更新: 在回答此問題時,Azure 門戶沒有此功能.它現在按照此處概述的方式進行.下面概述了在添加 UI 之前執行此操作的方法.

                  UPDATE: At the time of this answer the Azure Portal did not have this feature. It does now as outlined here. The following outlines the way to do this before the UI was added.

                  如何在 Portal 的 Azure BLOB 存儲中配置 CORS?

                  How can I configure CORS in Azure BLOB Storage in Portal?

                  如果您愿意,您可以隨時以編程方式設置 Blob 存儲的 CORS 規則.如果您使用的是 .Net 存儲客戶端庫,請查看存儲團隊的這篇博文:http://blogs.msdn.com/b/windowsazurestorage/archive/2014/02/03/windows-azure-storage-introducing-cors.aspx.從該博客文章中設置 CORS 設置的代碼:

                  If you want you can always set the CORS rules for blob storage programmatically. If you're using .Net Storage Client library, check out this blog post from storage team: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/02/03/windows-azure-storage-introducing-cors.aspx. Code for setting CORS setting from that blog post:

                  private static void InitializeCors()
                  {
                       // CORS should be enabled once at service startup
                       // Given a BlobClient, download the current Service Properties 
                       ServiceProperties blobServiceProperties = BlobClient.GetServiceProperties();
                       ServiceProperties tableServiceProperties = TableClient.GetServiceProperties();
                  
                       // Enable and Configure CORS
                       ConfigureCors(blobServiceProperties);
                       ConfigureCors(tableServiceProperties);
                  
                       // Commit the CORS changes into the Service Properties
                       BlobClient.SetServiceProperties(blobServiceProperties);
                       TableClient.SetServiceProperties(tableServiceProperties);
                  }
                  
                  private static void ConfigureCors(ServiceProperties serviceProperties)
                  {
                      serviceProperties.Cors = new CorsProperties();
                      serviceProperties.Cors.CorsRules.Add(new CorsRule()
                      {
                          AllowedHeaders = new List<string>() { "*" },
                          AllowedMethods = CorsHttpMethods.Put | CorsHttpMethods.Get | CorsHttpMethods.Head | CorsHttpMethods.Post,
                          AllowedOrigins = new List<string>() { "*" },
                          ExposedHeaders = new List<string>() { "*" },
                          MaxAgeInSeconds = 1800 // 30 minutes
                       });
                  }
                  

                  如果您正在尋找一種工具來做同樣的事情,一些存儲資源管理器支持配置 CORS - Azure 存儲資源管理器、Cerebrata Azure Management Studio、Cloud Portam(披露 - 我正在構建 Cloud Portam 實用程序).

                  If you're looking for a tool to do the same, a few storage explorers have support for configuring CORS - Azure Storage Explorer, Cerebrata Azure Management Studio, Cloud Portam (Disclosure - I'm building Cloud Portam utility).

                  正確配置 CORS 后,您可以使用 Rory 的回答中提到的代碼從 blob 存儲下載文件.正如 Rory 所說,您不必在客戶端做任何特別的事情.

                  Once the CORS is configured properly, you can use the code mentioned in Rory's answer to download the file from blob storage. You don't have to do anything special on the client side as mentioned by Rory.

                  這篇關于如何在門戶的 Azure BLOB 存儲中設置 CORS?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  XmlHttpRequest onprogress interval(XmlHttpRequest onprogress 間隔)
                  <i id='RXiIP'><tr id='RXiIP'><dt id='RXiIP'><q id='RXiIP'><span id='RXiIP'><b id='RXiIP'><form id='RXiIP'><ins id='RXiIP'></ins><ul id='RXiIP'></ul><sub id='RXiIP'></sub></form><legend id='RXiIP'></legend><bdo id='RXiIP'><pre id='RXiIP'><center id='RXiIP'></center></pre></bdo></b><th id='RXiIP'></th></span></q></dt></tr></i><div class="rguhk8u" id='RXiIP'><tfoot id='RXiIP'></tfoot><dl id='RXiIP'><fieldset id='RXiIP'></fieldset></dl></div>

                  • <tfoot id='RXiIP'></tfoot>

                    1. <legend id='RXiIP'><style id='RXiIP'><dir id='RXiIP'><q id='RXiIP'></q></dir></style></legend>

                          <bdo id='RXiIP'></bdo><ul id='RXiIP'></ul>

                          <small id='RXiIP'></small><noframes id='RXiIP'>

                            <tbody id='RXiIP'></tbody>
                          1. 主站蜘蛛池模板: 钛合金标准件-钛合金螺丝-钛管件-钛合金棒-钛合金板-钛合金锻件-宝鸡远航钛业有限公司 | 卫生纸复卷机|抽纸机|卫生纸加工设备|做卫生纸机器|小型卫生纸加工需要什么设备|卫生纸机器设备多少钱一台|许昌恒源纸品机械有限公司 | LOGO设计_品牌设计_VI设计 - 特创易 | 小学教案模板_中学教师优秀教案_高中教学设计模板_教育巴巴 | 政府园区专业委托招商平台_助力企业选址项目快速落地_东方龙商务集团 | 广州物流公司_广州货运公司_广州回程车运输 - 万信物流 | 高光谱相机-近红外高光谱相机厂家-高光谱成像仪-SINESPEC 赛斯拜克 | 拉伸膜,PE缠绕膜,打包带,封箱胶带,包装膜厂家-东莞宏展包装 | 液氮罐_液氮容器_自增压液氮罐_杜瓦瓶_班德液氮罐厂家 | ◆大型吹塑加工|吹塑加工|吹塑代加工|吹塑加工厂|吹塑设备|滚塑加工|滚塑代加工-莱力奇塑业有限公司 | 汝成内控-行政事业单位内部控制管理服务商 | 国产频谱分析仪-国产网络分析仪-上海坚融实业有限公司 | 钢制拖链生产厂家-全封闭钢制拖链-能源钢铝拖链-工程塑料拖链-河北汉洋机械制造有限公司 | 泥沙分离_泥沙分离设备_泥砂分离机_洛阳隆中重工机械有限公司 | 消泡剂_水处理消泡剂_切削液消泡剂_涂料消泡剂_有机硅消泡剂_广州中万新材料生产厂家 | 电动卫生级调节阀,电动防爆球阀,电动软密封蝶阀,气动高压球阀,气动对夹蝶阀,气动V型调节球阀-上海川沪阀门有限公司 | 药品仓库用除湿机-变电站用防爆空调-油漆房用防爆空调-杭州特奥环保科技有限公司 | 动物解剖台-成蚊接触筒-标本工具箱-负压实验台-北京哲成科技有限公司 | 不锈钢搅拌罐_高速搅拌罐厂家-无锡市凡格德化工装备科技有限公司 | 对夹式止回阀厂家,温州对夹式止回阀制造商--永嘉县润丰阀门有限公司 | 主题班会网 - 安全教育主题班会,各类主题班会PPT模板 | 垃圾压缩设备_垃圾处理设备_智能移动式垃圾压缩设备--山东明莱环保设备有限公司 | 武汉不干胶印刷_标签设计印刷_不干胶标签印刷厂 - 武汉不干胶标签印刷厂家 | 领先的大模型技术与应用公司-中关村科金 | 一氧化氮泄露报警器,二甲苯浓度超标报警器-郑州汇瑞埔电子技术有限公司 | 全自动包装秤_全自动上袋机_全自动套袋机_高位码垛机_全自动包装码垛系统生产线-三维汉界机器(山东)股份有限公司 | 世界箱包品牌十大排名,女包小众轻奢品牌推荐200元左右,男包十大奢侈品牌排行榜双肩,学生拉杆箱什么品牌好质量好 - Gouwu3.com | 【铜排折弯机,钢丝折弯成型机,汽车发泡钢丝折弯机,线材折弯机厂家,线材成型机,铁线折弯机】贝朗折弯机厂家_东莞市贝朗自动化设备有限公司 | 细砂提取机,隔膜板框泥浆污泥压滤机,螺旋洗砂机设备,轮式洗砂机械,机制砂,圆锥颚式反击式破碎机,振动筛,滚筒筛,喂料机- 上海重睿环保设备有限公司 | 南京精锋制刀有限公司-纵剪机刀片_滚剪机刀片_合金刀片厂家 | 北京网站建设公司_北京网站制作公司_北京网站设计公司-北京爱品特网站建站公司 | 浙江工业冷却塔-菱电冷却塔厂家 - 浙江菱电冷却设备有限公司 | 不锈钢轴流风机,不锈钢电机-许昌光维防爆电机有限公司(原许昌光维特种电机技术有限公司) | 广州番禺搬家公司_天河黄埔搬家公司_企业工厂搬迁_日式搬家_广州搬家公司_厚道搬迁搬家公司 | 【365公司转让网】公司求购|转让|资质买卖_股权转让交易平台 | 进口便携式天平,外校_十万分之一分析天平,奥豪斯工业台秤,V2000防水秤-重庆珂偌德科技有限公司(www.crdkj.com) | T恤衫定做,企业文化衫制作订做,广告T恤POLO衫定制厂家[源头工厂]-【汉诚T恤定制网】 | 商用绞肉机-熟肉切片机-冻肉切丁机-猪肉开条机 - 广州市正盈机械设备有限公司 | Pos机办理_个人商户免费POS机申请-拉卡拉办理网 | 江苏齐宝进出口贸易有限公司 | CTAB,表面活性剂1631溴型(十六烷基三甲基溴化铵)-上海升纬化工原料有限公司 |