question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DefaultMediaUrlProvider throws error when using FileSystemProvider.Azure

See original GitHub issue

In an Umbraco 8.0.2 Website we use the FileSystemProvider.Azure package to load media from azure storage, but since upgrading to Umbraco 8.1 all old media files stopped working. Trying to resolve image.url produces the following exception in our api:

image

This happens in our mapper function:

public IDtoBase Map(IPublishedElement publishedElement, string culture = null)
        {
            if (publishedElement is Image image)
            {
                return new ImageDto
                {
                    Type = Type,
                    Id = image.Key,
                    Path = image.Url(culture, UrlMode.Absolute),
                    WidthInPixels = image.Value(prop => prop.UmbracoWidth, culture),
                    HeightInPixels = image.Value(prop => prop.UmbracoHeight, culture)
                };
            }
            return null;
        }

When using the property variant of Image.Url we get the following message: image

Reproduction

  • Create an Umbraco 8.0.2 website
  • Add FileSystemProvider.Azure
  • Upload image(s)
  • Upgrade to Umbraco 8.1
  • Image.Url() won’t work anymore

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rasmusjpcommented, Jul 29, 2019

If the stored URL is already absolute we should just return that value

PR: https://github.com/umbraco/Umbraco-CMS/pull/6016

0reactions
nul800sebastiaancommented, Jul 29, 2019

PR #6016 should fix that, I’ve cherrypicked it into the 8.1 branch for release with 8.1.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AzureFileSystemProvider Class
The AzureFileSystemProvider is Azure Storage's implementation of the nio interface on top of Azure Blob Storage.
Read more >
v8.1.2
Flexible · 5906 - DefaultMediaUrlProvider throws error when using FileSystemProvider.Azure · 5976 - FIPS broken in v8.1 · 5995 - Unable to ...
Read more >
ImageProcessor ERROR with existing content uploaded to ...
I'm using FilesSystemProvider <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.
Read more >
Getting Error While Connecting to Azure Data Link Storage G2
Hi Guys, When I try to connect to Azure Data Link Storage G2 to my Power BI, It's saying the URL is invalid....
Read more >
Azure Blob Filesystem (ABFS)
This error is thrown because Hadoop ABFS currently does not support accounts with SoftDelete enabled. The only solution is to disable this feature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found