@@ -44,6 +44,8 @@ public class InstallerController : UmbracoAuthorizedApiController
4444
4545 private readonly string webConfigXdtPath = HostingEnvironment . MapPath ( $ "{ Constants . InstallerPath } { Constants . WebConfigFile } .install.xdt") ;
4646
47+ private readonly string mediaWebConfigXdtPath = HostingEnvironment . MapPath ( $ "{ Constants . InstallerPath } { Constants . MediaWebConfigXdtFile } .install.xdt") ;
48+
4749 /// <summary>
4850 /// Gets the parameters from the XDT transform file.
4951 /// </summary>
@@ -84,7 +86,7 @@ public InstallerStatus PostParameters(IEnumerable<Parameter> parameters)
8486
8587 if ( SaveParametersToFileSystemProvidersXdt ( this . fileSystemProvidersConfigInstallXdtPath , newParameters ) && SaveContainerNameToWebConfigXdt ( this . webConfigXdtPath , routePrefix ) )
8688 {
87- if ( ! ExecuteFileSystemConfigTransform ( ) || ! ExecuteWebConfigTransform ( ) )
89+ if ( ! ExecuteFileSystemConfigTransform ( ) || ! ExecuteWebConfigTransform ( ) || ! ExecuteMediaWebConfigTransform ( ) )
8890 {
8991 return InstallerStatus . SaveConfigError ;
9092 }
@@ -374,6 +376,20 @@ private static bool ExecuteWebConfigTransform()
374376 return transformConfig . Execute ( "UmbracoFileSystemProviders.Azure" , transFormConfigAction ) ;
375377 }
376378
379+ private static bool ExecuteMediaWebConfigTransform ( )
380+ {
381+ XmlNode transFormConfigAction =
382+ helper . parseStringToXmlNode ( "<Action runat=\" install\" "
383+ + "undo=\" true\" "
384+ + "alias=\" UmbracoFileSystemProviders.Azure.TransformConfig\" "
385+ + "file=\" ~/Media/web.config\" "
386+ + "xdtfile=\" ~/app_plugins/UmbracoFileSystemProviders/Azure/install/media-web.config\" >"
387+ + "</Action>" ) . FirstChild ;
388+
389+ PackageActions . TransformConfig transformConfig = new PackageActions . TransformConfig ( ) ;
390+ return transformConfig . Execute ( "UmbracoFileSystemProviders.Azure" , transFormConfigAction ) ;
391+ }
392+
377393 private static bool ExecuteImageProcessorSecurityConfigTransform ( )
378394 {
379395 // Ensure that security.config exists in ~/Config/Imageprocessor/
0 commit comments