Umbraco 9 | Upload Problem: Media uploads to /wwwroot/media but get's loaded from /Media
Hey there Umbraco Community.
I am currently trying to patch an Umbraco v8 Project (.NET 4) to Umbraco v9 (.NET 5 Core).
Everything went fine until I realised that when I upload an Image, Video, Document or any other type of Media to the CMS, it is uploaded to /wwwroot/media instead of /Media. Which in theory would be fine, but Umbraco then tries to load said uploads from /Media like in v4.
If anyone has any suggestions please advise since I am slowly loosing my mind about this. If I can provide any snippet of code, configs or any logs please tell me since I honestly wouldn't know where to start.
At this point in Umbraco 9 i don't think there is an easy way to tell umbraco (and imagesharp) to use a directory/virtual directory other than "/wwwroot/media" without using a lot of middleware code like the samples on that ticket. hope that helps
thank you very much for your answer. I sadly still can't figure out why it would write to /wwwroot/media/ but read from /Media. I will try your solution and update as I go. :)
Umbraco 9 | Upload Problem: Media uploads to /wwwroot/media but get's loaded from /Media
Hey there Umbraco Community.
I am currently trying to patch an Umbraco v8 Project (.NET 4) to Umbraco v9 (.NET 5 Core).
Everything went fine until I realised that when I upload an Image, Video, Document or any other type of Media to the CMS, it is uploaded to /wwwroot/media instead of /Media. Which in theory would be fine, but Umbraco then tries to load said uploads from /Media like in v4.
If anyone has any suggestions please advise since I am slowly loosing my mind about this. If I can provide any snippet of code, configs or any logs please tell me since I honestly wouldn't know where to start.
Thanks in advance <3
hi Joshua
this sounds similar to my thread here https://github.com/umbraco/Umbraco-CMS/issues/11580
At this point in Umbraco 9 i don't think there is an easy way to tell umbraco (and imagesharp) to use a directory/virtual directory other than "/wwwroot/media" without using a lot of middleware code like the samples on that ticket. hope that helps
thanks
Andrew
Hi Andrew,
thank you very much for your answer. I sadly still can't figure out why it would write to /wwwroot/media/ but read from /Media. I will try your solution and update as I go. :)
Best regards and happy holidays,
Joshua
I can't believe it.
There was a leftover web.config file in the /Media directory that caused all the routing confusion.
Fixed by deleting.
Finally it works.
is working on a reply...