Closed deMD closed 3 years ago
Hi,
I just want to confirm i am setup right to test this.
I have two sites,
<add key="AzureBlobFileSystem.ContainerName:media" value="jumoo-test-target-media" />
<add key="AzureBlobFileSystem.RootUrl:media" value="https://jumoodev.blob.core.windows.net/" />
With this exporting from source and importing to target works. and exporting from target and importing to source works.
Am i missing any extra steps to set this up ? have i missing a thing (i suspect i have!)
Hmm for me I use the UmbracoFileSystem.Azure on both sites with the following config:
<add key="AzureBlobFileSystem.ContainerName:media" value="media-omg" /> <-- different per site
<add key="AzureBlobFileSystem.RootUrl:media" value="https://[myAccountName].blob.core.windows.net/" />
<add key="AzureBlobFileSystem.ConnectionString:media" value="DefaultEndpointsProtocol=https;AccountName=[myAccountName];AccountKey=[myAccountKey]" />
<add key="AzureBlobFileSystem.MaxDays:media" value="365" />
<add key="AzureBlobFileSystem.UseDefaultRoute:media" value="false" /> <-- Set the false because I use custom route, see container name
<add key="AzureBlobFileSystem.UsePrivateContainer:media" value="false" />
What I notice when I check locally is that en extra subfolder is created in the storage account where it saves the images:
I see the same behaviour on our live environments, importing using uSync uploads files to https://cms-latam.website.com/media-la/-la
while adding an image via the media section uploads files to https://cms-latam.website.com/media-la
. So seems like something is splitting the folder name when using uSync :(
for reference it looks like this is an issue inside the UmbracoFileSystemProvider.Azure project.
when you have useDefaultRoute = false, and your container name starts 'media' then there is a part of the azure file provider that cleans up the file name.
I think it shouldn't strip the DefaultMediaRoute
value from the string if you are not using the default media route.
Describe the bug When using uSync Exporter to export media with media files, files are exported properly, however when importing the usync package the files are not uploaded. We use Azure storage using the package https://github.com/umbraco-community/UmbracoFileSystemProviders.Azure and a custom media folder name for each environment:
Steps to reproduce Install usync complete Install UmbracoFileSystemProviders.Azure Use a custom media location Export media Import media
Expected behavior Media is uploaded to Azure storage and linked to the imported media item.
Desktop (please complete the following information):