ImageProcessor setting for AzureBlobCache via web.config

410 views Asked by At

Hi i am in the process of implementing Azure KeyVault on to an Umbraco 7 website. This uses a private Azure Blob storage container to save all the media files.

The current plan is to move all the settings in the web.config as applicationSettings, and then simply using KeyVault encrypt the applicationSetting.

We are able to move all the FileSystemProvider paramter keys to the web.config, and need to move the settings from the ImageProcessor security.config to the web.config.

Does anyone know if this is possible (out of the box) or would a new IImageService be needed where we implement our own AugmentSettingsCore ... which seems excessive for a simple config location change

Thanks

1

There are 1 answers

0
Jörg Seibert On

I am struggling with ImageProcessor as well. I cannot configure AzureBlobCache to be in a working state. Nonetheless, I found this in ImageProcessor code:

private void OverrideDefaultSettingsWithAppSettingsValue(
  Dictionary<string, string> defaultSettings,
  string serviceOrPluginName)
{
  foreach (KeyValuePair<string, string> keyValuePair in new Dictionary<string, string>((IDictionary<string, string>) defaultSettings))
  {
    string name = "ImageProcessor." + serviceOrPluginName + "." + keyValuePair.Key;
    if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings[name]))
      defaultSettings[keyValuePair.Key] = ConfigurationManager.AppSettings[name];
  }
}

so you are able to do what you'd like to achieve by setting something like

<add key="ImageProcessor.CloudImageService.Container" value="media" />

in web.config or Azure Portal settings

hth J.