Copied to clipboard

Flag this post as spam?

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


  • Dinovo 7 posts 87 karma points
    Jun 08, 2018 @ 12:12
    Dinovo
    0

    Imported Media - not showing?

    I have imported a large amount of media items into a Umbraco 7.1 solution. The media is placed correctly in the /media/ folder, and it appears correctly within the Media tab, in the Backoffice.

    But, i cannot load the images directly, unless i append a querystring to the image. For example www.mydomain.com/media/1111/image.jpg?width=100 (works) but calling www.mydomain.com/media/1111/image.jpg without any querystring appended, does NOT work. It just returns a 404 error from the IIS.

    If i upload a new image/file to the media section, that file/image works as expected - it is only all my imported media, that is failing.

    The problem is both on local development and on the production server.

    Any clues as to what I am missing?

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 08, 2018 @ 12:29
    Andy Felton
    0

    Hi Dinova,

    Images with the querystring append of ?width=100 are passed through the ImageProcessor module, whereas I understood images without are handled directly by IIS therefore if the folder and file exists correctly they should be served correctly. If you go down to the actual image on the Back Office and edit it the uncropped image is downloaded using the image URL as well.

    When you're accessing images the numeral after media is the directory of the image and not the ID of the image (again do an inspect on the image in the backoffice to see that).

    What function are you using to render your media URL on your views?

    Hope that helps. Andy

  • Dinovo 7 posts 87 karma points
    Jun 08, 2018 @ 12:35
    Dinovo
    0

    Hi Andy

    Thx for your reply.

    When i said it worked in the backoffice, that was a half truth. All the thumbnails of the images, works in the backoffice (because they have an appended querystring to them). When i click each image, the image does not load, because it calls the image directly without the querystring. This is what I see: enter image description here

    All the images appear correctly in the media folder, on the drive on the server, i i can open them as i would expect.

    Currently i am only calling the images with the direct URL - no functions involved. I simply just want to be able to load the images, and files, when calling the direct URL, without the querystring appended. I realise that, the ImageProcessor takes over, when i add the querystring - but its wierd that I get a 404-response from the IIS, when removing the querystring. The path IS correct.

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 08, 2018 @ 12:49
    Andy Felton
    0

    Hi Dinovo,

    That now makes sense if it also doesn't work in the back office and only the thumbnails work (which are run through Image Processor).

    I'm just wondering if Umbraco does intercept the media URL.

    How did you import the media?

    Thanks Andy

  • Dinovo 7 posts 87 karma points
    Jun 08, 2018 @ 13:07
    Dinovo
    0

    The wierd thing is, that it works as expected when i upload a new media/file item. Then I can also call the URL directly, without the querystring, and see the image/file, as I would expect.

    I imported all the media via media = MediaService.CreateMedia(..); media.SetValue("umbracoFile", filename, file); MediaService.Save(media)

  • Dinovo 7 posts 87 karma points
    Jun 11, 2018 @ 06:25
    Dinovo
    0

    Anyone got any suggestions on this one? A bit stuck as to what i can do, to fix the issues :-/

Please Sign in or register to post replies

Write your reply to:

Draft