Copied to clipboard

Flag this post as spam?

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


  • Donovan Izilein 6 posts 96 karma points
    Jan 05, 2023 @ 16:39
    Donovan Izilein
    0

    Unable to Render Files Correctly Using the Multi URL Picker (MIME type Issue)

    Hi all, I'd appreciate some advice.

    I have Umbraco 8:18.4 running and I am linking the Multi URL Picker to a media item (not standard documents), but when the link is clicked I get the following message:

    "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

    An example URL Link is: https://abahughes-vender-dev.azurewebsites.net/media/j1qhvihe/bommel-bulb-lamp-birch.rfa

    I am using the standard Umbraco code from the documentation to render the files.

    @using Umbraco.Web.Models
    @{
        var links = Model.Value<IEnumerable<Link>>("footerLinks");
        if (links.Any())
        {
            <ul>
                @foreach (var link in links)
                {
                    <li><a href="@link.Url" target="_new">@link.Name</a></li>
                }
            </ul>
        }
    }
    

    I'd appreciate some advice as to how to handle this.

    Thanks in advance,

    Don

  • Huw Reddick 1061 posts 3581 karma points c-trib
    Jan 05, 2023 @ 18:20
    Huw Reddick
    0

    your code needs to be wrapped in a code block for us to see it, use the {} button after highlighting your code

  • Donovan Izilein 6 posts 96 karma points
    Jan 05, 2023 @ 22:11
    Donovan Izilein
    0

    My apologies, I have now updated the code above.

  • Huw Reddick 1061 posts 3581 karma points c-trib
    Jan 05, 2023 @ 23:03
    Huw Reddick
    0

    Your code looks fine, does it do the same if you link a different document type ( a pdf or text file etc)?

  • Donovan Izilein 6 posts 96 karma points
    Jan 05, 2023 @ 23:19
    Donovan Izilein
    0

    No, with the standard file types it is fine.

    If I zip the files then I can download it. But these unusual file types will not download.

  • Huw Reddick 1061 posts 3581 karma points c-trib
    Jan 06, 2023 @ 07:50
    Huw Reddick
    0

    Sounds like the issue is server related rather than Umbraco related. Are you hosting the site in IIS?

    If the answer is yes, you probably need to add .rfa files as a mimetype in your site configuration

    IIS will not return file types that are not added to the element or that have mappings in the element by default. This behavior prevents unauthorized access to files that do not have mappings in the IIS configuration settings.

  • Donovan Izilein 6 posts 96 karma points
    Jan 06, 2023 @ 17:21
    Donovan Izilein
    0

    We are using Azure WebApps. Do you happen to have any advice on how to do this with Azure WebApps?

  • Huw Reddick 1061 posts 3581 karma points c-trib
    Jan 06, 2023 @ 17:50
    Huw Reddick
    100

    You should be able to add them in the web.config

    https://paulhale.com/set-mime-types-for-azure-web-app/

  • Donovan Izilein 6 posts 96 karma points
    18 days ago
    Donovan Izilein
    0

    Thank you for your help. I added the custom mime types and that worked like a treat.

Please Sign in or register to post replies

Write your reply to:

Draft