Copied to clipboard

Flag this post as spam?

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


  • Khalid Aziz 6 posts 96 karma points
    Feb 17, 2016 @ 16:10
    Khalid Aziz
    0

    Unable to update PhysicalFileSystem correctly

    Hi all,

    I'm trying to update the location of the media files on our Umbraco instance from the dev folder of the machine to a network drive. I understand that the way to do this is to update the FileSystemProviders.config file.

    Here is the link I've been following: http://www.proworks.com/blog/archive/how-to-redirect-the-umbraco-media-path-to-another-location/

    I tried all the following variously:

    <add key="virtualRoot" value="asdsad"></add>
    

    And:

    <add key="rootPath" value="\\somedrive\media" />
    <add key="rootUrl" value="somesite.company.com" />
    

    I even tried inputting garbage, like so:

    <Parameters>
        asadsadasd
    </Parameters>
    

    The Umbraco instance still insists on outputting all media paths with the default "/media" prefix, and no exceptions are thrown in Elmah. I looked at the source code, and if the Umbraco.Core.IO.PhysicalFileSystem.cs file is being hit, there should have been an exception thrown at least. For example, in the very first case above, this case should have been caught and an exception thrown:

    if (virtualRoot.StartsWith("~/") == false)
        throw new ArgumentException("The virtualRoot argument must be a virtual path and start with '~/'");
    

    Am I missing something? Why am I not able to correctly update the path to the location of the media files?

    Thanks for your help!

Please Sign in or register to post replies

Write your reply to:

Draft