1

I'm using Sitecore 9.1.1 and SXA 1.8.1.

I needed to make .png and .txt files downloadable in my site, so I followed the answer here, and added a config patch where forceDownload is set to true for said media types.

The weird behavior: Whenever I open any item in my content editor, (just clicking on it really), it would instantly download a .png file! whether it is an image I attached inside my item, or just the icon sometimes, it is always downloaded!

Stranger still, is that I tried setting the forceDownload attributes to "false" in my patch file, but the instant downloads continued.

I have also tried removing the config patch altogether, and checking from http://myinstance/sitecore/admin/showconfig.aspx that the actual loaded config is false, but still the instant downloads continue.

What could be the problem here? I'm running out of ideas as to what could be wrong, any help would be greatly appreciated.

8
  • Even after an app_pool restart, you still experience the same issue? Sep 23, 2019 at 13:51
  • @HishaamNamooya I tried to do an "iisreset" if that's what you mean, and the issue still persists. Sep 23, 2019 at 14:02
  • Try clearing your browser cache and/or try an incognito browser tab. p.s. there were links to solution to your actual problem in the answer you linked to
    – jammykam
    Sep 23, 2019 at 14:06
  • @jammykam I tried clearing my cache and incognito too, i saw the other solutions in the link but they didn't work for my case, i currently just need to fix the autodownload that happens Sep 23, 2019 at 14:26
  • 1
    @MieElMansy In my case, we had a custom MediaProvider which overrode the GetMediaUrl method. It turns out that in the default MediaProvider, Sitecore also calls this method when generating a thumbnail. We added a check that fixed the problem.
    – maz
    Sep 24, 2019 at 19:07

1 Answer 1

0

So after multiple tries with "iisreset", clearing my cache, trying incognito mode and different browsers, the issue stopped happening as suddenly as it began. I guess the configuration was cached somewhere and was eventually removed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.