Umbraco-CMS
Umbraco-CMS copied to clipboard
Issue with downloading certain files from Media
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
9.3.1
Bug summary
Unable to download certain files after uploading them to Media.
Specifics
After uploading a .rvt file to Media and clicking the generated link - /media/x0dcaaju/1600.rvt, a Status Code: 404; Not Found is shown.

Upon clicking the link:

Steps to reproduce
- Upload an
.rvtfile to Media. - Click the generated link.
Expected result / actual result
The intended outcome is for the file to be downloaded.
It works well with common file types such as pdf, doc, png, gif, but fails to work with files such as .rvt.
Hi there @Yoadd!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
- We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
- If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
- We'll replicate the issue to ensure that the problem is as described.
- We'll decide whether the behavior is an issue or if the behavior is intended.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
I'm having a similar issue with version 10.0.1.
In the Startup.cs file I've added lines 49-50, 59-64 to the Configure function so I can upload .dae files:
That fixes the issue of being able to upload .dae files, however the image cropper feature then breaks because of that change. Does anyone know a solution, thanks
Think I've found a solution:

Think I've found a solution:
This works but I now can't upload pdf files to Umbraco for some reason and adding
provider.Mappings[".pdf"] = "application/pdf"
does not help either
Hi @Yoadd,
Thanks for reaching out. My apologies for the quite belated answer.
This is a .Net Core thing; the default static file middleware knows and handles about 400 different file formats (mime type mappings). However, you can indeed add your own with app.UseStaticFiles.
The following code adds "download" mapping for .dae-files:
var provider = new FileExtensionContentTypeProvider();
provider.Mappings.Add(".dae", "application/x-msdownload");
app.UseStaticFiles(new StaticFileOptions
{
ContentTypeProvider = provider
});
Try adding that at the very end of public void Configure(IApplicationBuilder app, IWebHostEnvironment env) in Startup. When tested on V10.3.2 this seems to work just fine, and does not clash with PDF uploads/downloads or other file/image serving.
I'm going to close this issue now. I would refer you to the forum (https://our.umbraco.com/forum) if you have anymore issues with this 😄