简体   繁体   English

Umbraco7:在同一个Azure存储帐户中设置多个/ media / blob容器

[英]Umbraco7: Set up multiple /media/ blob containers within the same Azure Storage account

We have multiple Umbraco sites that we need to migrate from an on-premise to Azure web apps. 我们有多个Umbraco网站,我们需要将其从内部部署迁移到Azure Web应用程序。

Each site has its own /media/ folder and as all the images require a big storage space (~2gb) and many read/write operations, we thought of using an Azure Storage Account via Blob containers solution for this. 每个站点都有其自己的/ media /文件夹,并且由于所有映像都需要较大的存储空间(〜2gb)和许多读/写操作,因此我们考虑为此使用通过Blob容器解决方案的Azure存储帐户。

Is it correct to say that using a single Azure Storage Account to serve all the sites' /media folders via Blob containers will cut costs rather than using separate storage accounts for every site? 说使用单个Azure存储帐户通过Blob容器为所有站点的/ media文件夹提供服务会降低成本,而不是为每个站点使用单独的存储帐户是否正确?

We've found the UmbracoFileSystemProviders.Azure package which is great, but can't find any details on how to achieve what's stated in the title of this post. 我们已经找到了很棒的UmbracoFileSystemProviders.Azure软件包,但是找不到有关如何实现本文标题中所述内容的任何详细信息。

Question : How can we set up multiple /media/ blob containers within the same Azure Storage account to serve the images of multiple Umbraco sites? 问题 :如何在同一个Azure存储帐户中设置多个/ media / blob容器来提供多个Umbraco站点的图像?

You can indeed use the one Azure Storage Account; 您确实可以使用一个Azure存储帐户。 just set up different blob containers for each website - they actually don't need to be called "media". 只需为每个网站设置不同的Blob容器-实际上,它们不需要称为“媒体”。 for example, I've set the containerName to Site1Media in the following example: 例如,在以下示例中,我将containerName设置为Site1Media

  <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
<Parameters>
    <add key="containerName" value="Site1Media"/>
    <add key="rootUrl" value="https://youritteam.blob.core.windows.net/"/>
    <add key="connectionString" value="DefaultEndpointsProtocol=https;AccountName=[Account];AccountKey=[Key]"/>
    <!--
    Optional configuration value determining the maximum number of days to cache items in the browser.
    Defaults to 365 days.
  -->
    <add key="maxDays" value="365"/>
    <!--
    When true this allows the VirtualPathProvider to use the deafult "media" route prefix regardless 
    of the container name.
  -->
    <add key="useDefaultRoute" value="true"/>
    <!--
    When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
  -->
    <add key="usePrivateContainer" value="false"/>
</Parameters>

The other thing about Azure Storage is that you only pay for the data you use; 关于Azure存储的另一件事是,您只需为使用的数据付费; so it's not going to cost you extra to set up multiple Storage Accounts - there's probably very little benefit in having one Storage Account for multiple websites; 因此,设置多个存储帐户不会花费您额外的费用-为多个网站拥有一个存储帐户可能几乎没有好处。 and you may find it much easier later on to have one Storage Account per website - particularly if you want to move the website to another subscription down the track. 而且以后您可能会发现每个网站拥有一个存储帐户会容易得多-特别是如果您想将网站转移到另一订阅中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检查 Azure blob 是否存在于多个容器的存储帐户中的任何位置? - How to check if Azure blob exists anywhere in storage account in multiple containers? 是否在同一Azure存储帐户中即时复制Blob? - Is copying blob within the same Azure storage account instant? 用于容器的 Azure webapp,无法将 azure blob 存储帐户附加到容器 - Azure webapp for containers,cant attach azure blob storage account to container 需要将 Azure 存储帐户容器和 blob 访问级别更改为私有 - Need to change Azure Storage account containers and blob access levels to private 使用新的 Azure.Storage.Blobs 时如何计算存储帐户中 Blob 存储容器的总大小 - How to calculate the total size of Blob storage containers in an storage account when using the new Azure.Storage.Blobs Azure blob存储:多个容器的共享访问签名? - Azure blob storage: Shared access signature for multiple containers? 如何将多个 Blob 容器从一个存储帐户复制到另一个存储帐户(不同订阅) - How to copy multiple blob containers from one storage account to another storage account(different subscriptions) 同一 Azure 存储帐户上的多个 React 站点 - Multiple React sites on the same Azure storage account 尝试在azure存储帐户/ Blob上设置cors时出现无限错误 - Endless Errors when trying to set cors on azure storage account / Blob 如何列出 azure blob 存储中的容器? - How to List the containers in azure blob storage?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM