@@ -44,6 +44,8 @@ public class InstallerController : UmbracoAuthorizedApiController
44
44
45
45
private readonly string webConfigXdtPath = HostingEnvironment . MapPath ( $ "{ Constants . InstallerPath } { Constants . WebConfigFile } .install.xdt") ;
46
46
47
+ private readonly string mediaWebConfigXdtPath = HostingEnvironment . MapPath ( $ "{ Constants . InstallerPath } { Constants . MediaWebConfigXdtFile } .install.xdt") ;
48
+
47
49
/// <summary>
48
50
/// Gets the parameters from the XDT transform file.
49
51
/// </summary>
@@ -84,7 +86,7 @@ public InstallerStatus PostParameters(IEnumerable<Parameter> parameters)
84
86
85
87
if ( SaveParametersToFileSystemProvidersXdt ( this . fileSystemProvidersConfigInstallXdtPath , newParameters ) && SaveContainerNameToWebConfigXdt ( this . webConfigXdtPath , routePrefix ) )
86
88
{
87
- if ( ! ExecuteFileSystemConfigTransform ( ) || ! ExecuteWebConfigTransform ( ) )
89
+ if ( ! ExecuteFileSystemConfigTransform ( ) || ! ExecuteWebConfigTransform ( ) || ! ExecuteMediaWebConfigTransform ( ) )
88
90
{
89
91
return InstallerStatus . SaveConfigError ;
90
92
}
@@ -374,6 +376,20 @@ private static bool ExecuteWebConfigTransform()
374
376
return transformConfig . Execute ( "UmbracoFileSystemProviders.Azure" , transFormConfigAction ) ;
375
377
}
376
378
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
+
377
393
private static bool ExecuteImageProcessorSecurityConfigTransform ( )
378
394
{
379
395
// Ensure that security.config exists in ~/Config/Imageprocessor/
0 commit comments