Copied to clipboard

Flag this post as spam?

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


  • Joshua Weber 20 posts 152 karma points
    Dec 20, 2021 @ 16:00
    Joshua Weber
    0

    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

  • andrew shearer 510 posts 659 karma points
    Dec 21, 2021 @ 19:46
    andrew shearer
    1

    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

  • Joshua Weber 20 posts 152 karma points
    Dec 23, 2021 @ 09:58
    Joshua Weber
    0

    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

  • Joshua Weber 20 posts 152 karma points
    Dec 23, 2021 @ 10:30
    Joshua Weber
    100

    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.

Please Sign in or register to post replies

Write your reply to:

Draft