umbraco-community / UmbracoFileSystemProviders.Azure

:cloud: An Azure Blob Storage IFileSystem provider for Umbraco
96 stars 67 forks source link

Use a different prefix than media #173

Open ssougnez opened 4 years ago

ssougnez commented 4 years ago

Hello,

I have an Umbraco web app hosted on premise. For this one, we used "rootUrl" and "rootPath" in the configuration of the FileSystemProvider. The result is that our images are available at a relative URL that starts with "/files/" instead of "/media". Now I'm trying to migrate to Azure by using this package (the v1.1 as we're using Umbraco 7.14) but I'm having troubles to figure out how I could change the prefix.

For now, I'm having this:

<Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
    <Parameters>
        <add key="containerName" value="files"/>
        <add key="rootUrl" value="https://....blob.core.windows.net/" />
        <add key="connectionString" value="..."/>
        <add key="maxDays" value="365"/>
        <add key="useDefaultRoute" value="true"/>
        <add key="usePrivateContainer" value="false"/>
    </Parameters>
</Provider>

I thought that changing "useDefaultRoute" to "false" would work and that the "containerName" would be used to server the files, but when I do so, neither the "/files" nor "/media" URL work. With the configure above, only the URL starting with "/media" works, but in the database, all the URL start with "/files".

Is there a way to configure this package to use "/files" instead of "/media" ?

Thanks

0Neji commented 3 years ago

Hi,

@ssougnez Any chance you ever found out how to do this?

We're trying to change our media path to files/media with no luck.

Thanks,

Ben