Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ratish Garg 1 post 71 karma points
    Sep 22, 2021 @ 14:16
    Ratish Garg
    0

    Image Processor CDN caching

    Hi,

    I'm trying to setup Image processor CDN caching. I was going through forum and tried different variations for my config files but no luck so far. Can someone please guide me in the right direction? Here is the Security as well as cache config files that I am using security.config

    <service prefix="site-assets/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
      <settings>
        <setting key="MaxBytes" value="4194304" />
        <setting key="Timeout" value="3000" />
        <setting Key="Host" value="https://{Name}.blob.core.windows.net/site-assets/"/>
      </settings>
    </service>
    

    cache config

      <settings>
        <setting key="CachedStorageAccount" value="{endpoint}" />
        <setting key="CachedBlobContainer" value="site-assets" />
        <setting key="UseCachedContainerInUrl" value="true" />
        <setting key="CachedCDNRoot" value="{root-url}" />
        <!--<setting key="CachedCDNTimeout" value="3600" />-->
        <!--<setting key="UseCachedContainerInUrl" value="false"/>-->
        <!--<setting key="StreamCachedImage" value="false"/>-->
      </settings>
    
  • Erik Eelman 79 posts 319 karma points
    Sep 27, 2021 @ 09:16
    Erik Eelman
    0

    Hi Ratish,

    Seems like you are missing the container name property in the security.config file:

    <settings>
        <setting key="Container" value="[container name]"/>
        <setting key="MaxBytes" value="8194304"/>
        <setting key="Timeout" value="30000"/>
        <setting key="Host" value="https://[your blob account].blob.core.windows.net/"/>
    </settings>
    

    And do you have the required settings in your web.config file of your project?

        <appSettings>
      <add key="AzureBlobFileSystem.ContainerName:media" value="media" />
      <add key="AzureBlobFileSystem.RootUrl:media" value="https://[myAccountName].blob.core.windows.net/" />
      <add key="AzureBlobFileSystem.ConnectionString:media"
        value="DefaultEndpointsProtocol=https;AccountName=[myAccountName];AccountKey=[myAccountKey]" />
      <add key="AzureBlobFileSystem.MaxDays:media" value="365" />
      <add key="AzureBlobFileSystem.UseDefaultRoute:media" value="true" />
      <add key="AzureBlobFileSystem.UsePrivateContainer:media" value="false" />
    </appSettings>
    

    You can find the full documentation about this here: https://our.umbraco.com/documentation/Extending/FileSystemProviders/Azure-Blob-Storage/

Please Sign in or register to post replies

Write your reply to:

Draft