Copied to clipboard

Flag this post as spam?

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


  • Yoadd 6 posts 76 karma points
    Aug 08, 2022 @ 07:01
    Yoadd
    0

    Problem with downloading certain files from Media

    Hello,

    I uploaded some files to Media, created a downloadable link in View like so:

    @{
        var linkToMedia = Model.Value<Link>("linkToMedia");
        if (linkToMedia != null)
       {
            <a download href="@linkToMedia.Url">@linkToMedia.Name</a>
       }
    }
    

    While this works well for common file extensions such as pdf and doc, it fails to download files such as rvt.

    We are using .NET Core and hosting our website on IIS if that matters. I already tried adding said extension to IIS but did not help.

    Is Umbraco perhaps blocking uncommon file extensions? Or do I need to explicitly allow extensions?

    P.S. Our rvt files weigh over 40MB so I already increased the size limit of uploaded files in Media via IIS but when I click the uploaded file in Media, navigating to https://localhost:44310/media/x0dcaaju/test.rvt it returns Status Code: 404; Not Found.

  • Yasir Butt 161 posts 371 karma points
    Jan 12, 2024 @ 14:47
    Yasir Butt
    0

    Hi,

    I have the same problem in umbraco 12. it is not downloading .app file

    got you fixed it?

    /Yasir

  • Yakov Lebski 591 posts 2346 karma points
    Jan 13, 2024 @ 15:47
    Yakov Lebski
    0

    I think it missing mime type in iis, you can add it manually in web.config or IIS manager

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jan 13, 2024 @ 15:47
    Huw Reddick
    0

    You probably need to add the mime type to allow it to be downloaded

Please Sign in or register to post replies

Write your reply to:

Draft